github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/tenant/privilege/create_user_default_role.result (about) 1 set global enable_privilege_cache = off; 2 drop role if exists r1; 3 create role r1; 4 drop user if exists u1; 5 create user u1 identified by '111' default role r1; 6 show tables; 7 internal error: do not have privilege to execute the statement 8 use mo_catalog; 9 internal error: do not have privilege to execute the statement 10 create database t; 11 internal error: do not have privilege to execute the statement 12 grant show databases on account * to r1; 13 grant show tables on database * to r1; 14 use mo_catalog; 15 internal error: do not have privilege to execute the statement 16 show tables; 17 not connect to a database 18 create database t; 19 internal error: do not have privilege to execute the statement 20 grant connect on account * to r1; 21 use mo_catalog; 22 show tables; 23 Tables_in_mo_catalog 24 mo_indexes 25 mo_database 26 mo_tables 27 mo_columns 28 mo_table_partitions 29 mo_user 30 mo_role 31 mo_user_grant 32 mo_role_grant 33 mo_role_privs 34 mo_user_defined_function 35 mo_mysql_compatibility_mode 36 mo_pubs 37 mo_stored_procedure 38 mo_stages 39 mo_sessions 40 mo_snapshots 41 mo_configurations 42 mo_locks 43 mo_variables 44 mo_transactions 45 mo_cache 46 mo_version 47 mo_upgrade 48 mo_upgrade_tenant 49 mo_account 50 mo_foreign_keys 51 create database t; 52 internal error: do not have privilege to execute the statement 53 grant create database on account * to r1; 54 create database t; 55 use t; 56 create table A(a int); 57 drop table A; 58 grant create table on database * to r1; 59 use t; 60 create table A(a int); 61 insert into A values (1),(1); 62 grant insert on table t.* to r1; 63 use t; 64 insert into A values (1),(1); 65 select a from A; 66 a 67 1 68 1 69 1 70 1 71 grant select on table t.* to r1; 72 use t; 73 select a from A; 74 a 75 1 76 1 77 1 78 1 79 update A set a = 2 where a = 1; 80 update A set a = 2; 81 grant update on table t.* to r1; 82 use t; 83 update A set a = 2 where a = 1; 84 update A set a = 2; 85 delete from A where a = 2; 86 delete from A; 87 grant delete on table t.* to r1; 88 use t; 89 delete from A where a = 2; 90 delete from A; 91 select a from A; 92 a 93 drop table A; 94 grant drop table on database t to r1; 95 use t; 96 drop table A; 97 no such table t.a 98 create database s; 99 use s; 100 create table B(b int); 101 insert into B values (1),(1); 102 grant select,insert,update,delete on table s.* to r1; 103 use s; 104 insert into B values (1),(1); 105 select b from B; 106 b 107 1 108 1 109 1 110 1 111 update B set b = 2 where b=1; 112 update B set b = 2; 113 delete from B where b = 1; 114 delete from B; 115 drop table B; 116 grant drop table on database s to r1; 117 use s; 118 drop table B; 119 no such table s.b 120 drop database t; 121 drop database s; 122 create database v; 123 use v; 124 grant create table,drop table on database v to r1; 125 use v; 126 create table A(a int); 127 create table B(b int); 128 create table C(c int); 129 create table D(d int); 130 create table E(e int); 131 create table F(f int); 132 create table G(g int); 133 create table H(h int); 134 grant select on table v.A to r1; 135 use v; 136 select * from A,B; 137 internal error: do not have privilege to execute the statement 138 select * from A,B where A.a = B.b; 139 internal error: do not have privilege to execute the statement 140 grant select on table v.B to r1; 141 use v; 142 select * from A,B; 143 a b 144 select * from A,B where A.a = B.b; 145 a b 146 update C,D set c = d+1 where c = d; 147 grant update on table v.C to r1; 148 use v; 149 update C,D set c = d+1 where c = d; 150 grant update on table v.D to r1; 151 use v; 152 update C,D set c = d+1 where c = d; 153 use v; 154 delete E,F from E,F where E.e = F.f; 155 grant update on table v.E to r1; 156 grant delete on table v.F to r1; 157 use v; 158 delete E,F from E,F where E.e = F.f; 159 grant delete on table v.E to r1; 160 use v; 161 delete E,F from E,F where E.e = F.f; 162 use v; 163 insert into G select A.a from A,B where A.a = B.b; 164 grant insert on table v.G to r1; 165 use v; 166 insert into G select A.a from A,B where A.a = B.b; 167 drop database if exists t; 168 internal error: do not have privilege to execute the statement 169 drop database if exists s; 170 internal error: do not have privilege to execute the statement 171 drop database if exists v; 172 grant drop database on account * to r1; 173 drop database if exists t; 174 drop database if exists s; 175 drop database if exists v; 176 drop role if exists r1; 177 drop user if exists u1; 178 set global enable_privilege_cache = on;