github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/zz_accesscontrol/revoke_privs_role.result (about) 1 set global enable_privilege_cache = off; 2 drop database if exists revoke_db_01; 3 drop role if exists revoke_role_1,revoke_role_2,revoke_role_3,revoke_role_4,revoke_role_5,revoke_role_6,revoke_role_7,revoke_role_8; 4 drop user if exists revoke_user_1,revoke_user_2,revoke_user_3,revoke_user_4,revoke_user_5,revoke_user_6,revoke_user_7; 5 create role if not exists revoke_role_1,revoke_role_2,revoke_role_3,revoke_role_4,revoke_role_5,revoke_role_6,revoke_role_7,revoke_role_8; 6 create user if not exists revoke_user_1 identified by '12345678',revoke_user_2 identified by '12345678',revoke_user_3 identified by '12345678',revoke_user_4 identified by '12345678',revoke_user_5 identified by '12345678',revoke_user_6 identified by '12345678',revoke_user_7 identified by '12345678'; 7 create database revoke_db_01; 8 grant create user, drop user, alter user, create role, drop role, create database,drop database on account * to revoke_role_1 with grant option; 9 grant revoke_role_1 to revoke_user_1; 10 revoke create user, drop user, alter user on account * from revoke_role_1; 11 select role_name, privilege_name, privilege_level from mo_catalog.mo_role_privs where role_name='revoke_role_1'; 12 role_name privilege_name privilege_level 13 revoke_role_1 create role * 14 revoke_role_1 drop role * 15 revoke_role_1 create database * 16 revoke_role_1 drop database * 17 create user re_test_user identified by '12345678'; 18 internal error: do not have privilege to execute the statement 19 drop user re_test_user; 20 internal error: do not have privilege to execute the statement 21 create role revoke_role_9; 22 drop role revoke_role_9; 23 revoke all on account * from revoke_role_3; 24 revoke create user, drop user, show tables on account * from revoke_role_1; 25 internal error: the privilege "show tables" can only be granted to the object type "database" 26 revoke create user, drop user, show tables on table *.* from revoke_role_1; 27 internal error: the privilege "create user" can only be granted to the object type "account" 28 revoke create user, drop user on account * from re_not_exists; 29 internal error: there is no role re_not_exists 30 revoke all on account * from revoke_role_1; 31 grant create table,drop table,alter table on database *.* to revoke_role_2,revoke_role_3 with grant option; 32 grant all on account * to revoke_role_2; 33 grant revoke_role_2 to revoke_user_2; 34 grant revoke_role_3 to revoke_user_3; 35 revoke drop table,create table on database *.* from revoke_role_2,revoke_role_3; 36 select role_name, privilege_name, privilege_level from mo_catalog.mo_role_privs where role_name in ('revoke_role_2','revoke_role_3'); 37 role_name privilege_name privilege_level 38 revoke_role_2 alter table *.* 39 revoke_role_3 alter table *.* 40 revoke_role_2 account all * 41 create table revoke_db_01.revoke_table_1(a int,b varchar(20),c double); 42 internal error: do not have privilege to execute the statement 43 drop table revoke_db_01.revoke_table_1; 44 internal error: do not have privilege to execute the statement 45 create database revoke_db_02; 46 drop database revoke_db_02; 47 create table revoke_db_01.revoke_table_1(a int,b varchar(20),c double); 48 internal error: do not have privilege to execute the statement 49 drop table revoke_db_01.revoke_table_1; 50 internal error: do not have privilege to execute the statement 51 revoke create table,select,insert on database * from revoke_role_2,revoke_role_3; 52 internal error: the privilege "select" can only be granted to the object type "table" 53 revoke if exists create table,select,insert on database * from revoke_role_2,revoke_role_3; 54 internal error: the privilege "select" can only be granted to the object type "table" 55 revoke all on account * from revoke_role_2,revoke_role_3; 56 revoke if exists all on account * from revoke_role_2,revoke_role_3; 57 grant all on table *.* to revoke_role_4,revoke_role_5 with grant option; 58 grant create table,drop table,alter table on database *.* to revoke_role_5; 59 grant revoke_role_4 to revoke_user_4 with grant option; 60 grant revoke_role_5 to revoke_user_5; 61 revoke all on table *.* from revoke_role_4,revoke_role_5; 62 select role_name, privilege_name, privilege_level from mo_catalog.mo_role_privs where role_name in ('revoke_role_4','revoke_role_5'); 63 role_name privilege_name privilege_level 64 revoke_role_5 create table *.* 65 revoke_role_5 drop table *.* 66 revoke_role_5 alter table *.* 67 select * from mo_catalog.mo_user; 68 internal error: do not have privilege to execute the statement 69 select * from mo_catalog.mo_user; 70 internal error: do not have privilege to execute the statement 71 create table revoke_db_01.revoke_table_2(a int,b varchar(20),c double); 72 internal error: do not have privilege to execute the statement 73 drop table revoke_db_01.revoke_table_2; 74 internal error: do not have privilege to execute the statement 75 grant ownership on database revoke_db_01 to revoke_role_6; 76 grant all on table *.* to revoke_role_6; 77 grant revoke_role_6 to revoke_user_6; 78 revoke ownership on database revoke_db_01 from revoke_role_6; 79 create table revoke_test_table_1(a int); 80 internal error: do not have privilege to execute the statement 81 drop table revoke_test_table_1; 82 internal error: do not have privilege to execute the statement 83 grant ownership on database revoke_db_01 to revoke_role_7; 84 internal error: do not have privilege to execute the statement 85 select * from revoke_db_01.revoke_table_1; 86 SQL parser error: table "revoke_table_1" does not exist 87 drop database if exists revoke_db_01; 88 drop role if exists revoke_role_1,revoke_role_2,revoke_role_3,revoke_role_4,revoke_role_5,revoke_role_6,revoke_role_7,revoke_role_8; 89 drop user if exists revoke_user_1,revoke_user_2,revoke_user_3,revoke_user_4,revoke_user_5,revoke_user_6,revoke_user_7; 90 set global enable_privilege_cache = on;