github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/zz_accesscontrol/inner_object.result (about) 1 set global enable_privilege_cache = off; 2 drop account if exists account1; 3 drop account if exists inner_account; 4 drop role if exists revoke_role_1; 5 select user_name,owner from mo_catalog.mo_user where user_name="root"; 6 user_name owner 7 root 0 8 select role_id,role_name,owner from mo_catalog.mo_role where role_name in ("moadmin","public"); 9 role_id role_name owner 10 0 moadmin 0 11 1 public 0 12 create account account1 ADMIN_NAME 'admin' IDENTIFIED BY '123456'; 13 select role_id,role_name,owner from mo_catalog.mo_role; 14 role_id role_name owner 15 2 accountadmin 2 16 1 public 2 17 show databases; 18 Database 19 system 20 system_metrics 21 information_schema 22 mysql 23 mo_catalog 24 show grants; 25 Grants for admin@localhost 26 GRANT create user ON account `admin`@`localhost` 27 GRANT drop user ON account `admin`@`localhost` 28 GRANT alter user ON account `admin`@`localhost` 29 GRANT create role ON account `admin`@`localhost` 30 GRANT drop role ON account `admin`@`localhost` 31 GRANT create database ON account `admin`@`localhost` 32 GRANT drop database ON account `admin`@`localhost` 33 GRANT show databases ON account `admin`@`localhost` 34 GRANT connect ON account `admin`@`localhost` 35 GRANT manage grants ON account `admin`@`localhost` 36 GRANT account all ON account `admin`@`localhost` 37 GRANT show tables ON database * `admin`@`localhost` 38 GRANT create table ON database * `admin`@`localhost` 39 GRANT drop table ON database * `admin`@`localhost` 40 GRANT alter table ON database * `admin`@`localhost` 41 GRANT create view ON database * `admin`@`localhost` 42 GRANT drop view ON database * `admin`@`localhost` 43 GRANT alter view ON database * `admin`@`localhost` 44 GRANT database all ON database * `admin`@`localhost` 45 GRANT database ownership ON database * `admin`@`localhost` 46 GRANT select ON table *.* `admin`@`localhost` 47 GRANT insert ON table *.* `admin`@`localhost` 48 GRANT update ON table *.* `admin`@`localhost` 49 GRANT truncate ON table *.* `admin`@`localhost` 50 GRANT delete ON table *.* `admin`@`localhost` 51 GRANT reference ON table *.* `admin`@`localhost` 52 GRANT index ON table *.* `admin`@`localhost` 53 GRANT table all ON table *.* `admin`@`localhost` 54 GRANT table ownership ON table *.* `admin`@`localhost` 55 GRANT values ON table *.* `admin`@`localhost` 56 GRANT connect ON account `admin`@`localhost` 57 use system; 58 show triggers; 59 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation 60 use mo_catalog; 61 show columns from mo_tables; 62 Field Type Null Key Default Extra Comment 63 rel_id BIGINT UNSIGNED(0) YES PRI null 64 relname VARCHAR(5000) YES null 65 reldatabase VARCHAR(5000) YES null 66 reldatabase_id BIGINT UNSIGNED(0) YES null 67 relpersistence VARCHAR(5000) YES null 68 relkind VARCHAR(5000) YES null 69 rel_comment VARCHAR(5000) YES null 70 rel_createsql TEXT(0) YES null 71 created_time TIMESTAMP(0) YES null 72 creator INT UNSIGNED(0) YES null 73 owner INT UNSIGNED(0) YES null 74 account_id INT UNSIGNED(0) YES null 75 partitioned TINYINT(0) YES null 76 partition_info BLOB(0) YES null 77 viewdef VARCHAR(5000) YES null 78 constraint VARCHAR(5000) YES null 79 rel_version INT UNSIGNED(0) YES null 80 catalog_version INT UNSIGNED(0) YES null 81 select datname, dat_createsql from mo_database; 82 datname dat_createsql 83 system create database system 84 system_metrics create database system_metrics 85 information_schema create database information_schema 86 mysql create database mysql 87 mo_catalog 88 select relname from mo_tables where relname="sql_statement_total"; 89 relname 90 sql_statement_total 91 select relname from mo_tables where relname="mo_user"; 92 relname 93 mo_user 94 select relname from mo_tables where relname="tables"; 95 relname 96 tables 97 select user_name,authentication_string from mo_user; 98 user_name authentication_string 99 admin *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 100 select role_name from mo_role; 101 role_name 102 accountadmin 103 public 104 create database account_db; 105 use account_db; 106 show tables; 107 Tables_in_account_db 108 create table a(col int); 109 show create table a; 110 Table Create Table 111 a CREATE TABLE `a` (\n`col` INT DEFAULT NULL\n) 112 show tables; 113 Tables_in_account_db 114 a 115 show databases; 116 Database 117 system 118 system_metrics 119 information_schema 120 mysql 121 mo_catalog 122 account_db 123 update mo_catalog.mo_tables set relname='mo_aaaa'; 124 internal error: do not have privilege to execute the statement 125 insert into mo_catalog.mo_role values (1763,'apple',0,1,'2022-09-22 06:53:34',''); 126 internal error: do not have privilege to execute the statement 127 delete from mo_catalog.mo_user; 128 internal error: do not have privilege to execute the statement 129 drop table mo_catalog.mo_account; 130 internal error: do not have privilege to execute the statement 131 delete from mo_catalog.mo_user_grant; 132 internal error: do not have privilege to execute the statement 133 delete from mo_catalog.mo_role_grant; 134 internal error: do not have privilege to execute the statement 135 delete from mo_catalog.mo_role_privs; 136 internal error: do not have privilege to execute the statement 137 delete from mo_catalog.mo_database; 138 internal error: do not have privilege to execute the statement 139 delete from mo_catalog.mo_columns; 140 internal error: do not have privilege to execute the statement 141 delete from mo_catalog.mo_indexes; 142 internal error: do not have privilege to execute the statement 143 delete from mo_catalog.mo_table_partitions; 144 internal error: do not have privilege to execute the statement 145 drop database information_schema; 146 internal error: do not have privilege to execute the statement 147 drop database mo_catalog; 148 internal error: do not have privilege to execute the statement 149 drop database system; 150 internal error: do not have privilege to execute the statement 151 drop database system_metrics; 152 internal error: do not have privilege to execute the statement 153 revoke moadmin,public from root; 154 internal error: the role moadmin can not be revoked 155 select count(*) from mo_catalog.mo_role_privs where role_name in ('moadmin','public'); 156 count(*) 157 35 158 drop role if exists moadmin,public; 159 internal error: can not delete the role moadmin 160 select role_name from mo_role where role_name in('moadmin','public'); 161 SQL parser error: table "mo_role" does not exist 162 drop user if exists admin,root; 163 internal error: can not delete the user root 164 create account inner_account ADMIN_NAME 'admin' IDENTIFIED BY '111'; 165 revoke accountadmin from admin; 166 internal error: the role accountadmin can not be revoked 167 select count(*) from mo_catalog.mo_role_privs where role_name in ('accountadmin'); 168 count(*) 169 30 170 drop role if exists accountadmin; 171 internal error: can not delete the role accountadmin 172 select role_name from mo_catalog.mo_role where role_name in('accountadmin'); 173 role_name 174 accountadmin 175 create table tb1( 176 deptno int unsigned, 177 dname varchar(15), 178 loc varchar(50), 179 unique key(deptno) 180 ); 181 select `name`,`type`,`name`,`is_visible`,`hidden`,`comment`,`column_name`,`ordinal_position`,`options` from mo_catalog.mo_indexes where table_id = (select rel_id from mo_catalog.mo_tables where relname = 'tb1'); 182 name type name is_visible hidden comment column_name ordinal_position options 183 deptno UNIQUE deptno 1 0 deptno 1 null 184 desc mo_catalog.mo_indexes; 185 Field Type Null Key Default Extra Comment 186 id BIGINT UNSIGNED(64) NO PRI null 187 table_id BIGINT UNSIGNED(64) NO null 188 database_id BIGINT UNSIGNED(64) NO null 189 name VARCHAR(64) NO null 190 type VARCHAR(11) NO null 191 algo VARCHAR(11) YES null 192 algo_table_type VARCHAR(11) YES null 193 algo_params VARCHAR(2048) YES null 194 is_visible TINYINT(8) NO null 195 hidden TINYINT(8) NO null 196 comment VARCHAR(2048) NO null 197 column_name VARCHAR(256) NO PRI null 198 ordinal_position INT UNSIGNED(32) NO null 199 options TEXT(0) YES null 200 index_table_name VARCHAR(5000) YES null 201 CREATE TABLE trp ( 202 id INT NOT NULL, 203 fname VARCHAR(30), 204 lname VARCHAR(30), 205 hired DATE NOT NULL DEFAULT '1970-01-01', 206 separated DATE NOT NULL DEFAULT '9999-12-31', 207 job_code INT, 208 store_id INT 209 ) 210 PARTITION BY RANGE ( YEAR(separated) ) ( 211 PARTITION p0 VALUES LESS THAN (1991), 212 PARTITION p1 VALUES LESS THAN (1996), 213 PARTITION p2 VALUES LESS THAN (2001), 214 PARTITION p3 VALUES LESS THAN MAXVALUE 215 ); 216 select tbl.relname, part.number, part.name, part.description_utf8, part.comment, part.options, part.partition_table_name 217 from mo_catalog.mo_tables tbl left join mo_catalog.mo_table_partitions part on tbl.rel_id = part.table_id 218 where tbl.relname = 'trp'; 219 relname number name description_utf8 comment options partition_table_name 220 trp 1 p0 1991 null %!%p0%!%trp 221 trp 2 p1 1996 null %!%p1%!%trp 222 trp 3 p2 2001 null %!%p2%!%trp 223 trp 4 p3 MAXVALUE null %!%p3%!%trp 224 desc mo_catalog.mo_table_partitions; 225 Field Type Null Key Default Extra Comment 226 table_id BIGINT UNSIGNED(64) NO PRI null 227 database_id BIGINT UNSIGNED(64) NO null 228 number SMALLINT UNSIGNED(16) NO null 229 name VARCHAR(64) NO PRI null 230 partition_type VARCHAR(50) NO null 231 partition_expression VARCHAR(2048) YES null 232 description_utf8 TEXT(0) YES null 233 comment VARCHAR(2048) NO null 234 options TEXT(0) YES null 235 partition_table_name VARCHAR(1024) NO null 236 create account accx11 ADMIN_NAME 'admin' IDENTIFIED BY '111'; 237 select `name`,`type`,`name`,`is_visible`,`hidden`,`comment`,`column_name`,`ordinal_position`,`options` from mo_catalog.mo_indexes where table_id = (select rel_id from mo_catalog.mo_tables where relname = 'tb1'); 238 name type name is_visible hidden comment column_name ordinal_position options 239 desc mo_catalog.mo_indexes; 240 Field Type Null Key Default Extra Comment 241 id BIGINT UNSIGNED(64) NO PRI null 242 table_id BIGINT UNSIGNED(64) NO null 243 database_id BIGINT UNSIGNED(64) NO null 244 name VARCHAR(64) NO null 245 type VARCHAR(11) NO null 246 algo VARCHAR(11) YES null 247 algo_table_type VARCHAR(11) YES null 248 algo_params VARCHAR(2048) YES null 249 is_visible TINYINT(8) NO null 250 hidden TINYINT(8) NO null 251 comment VARCHAR(2048) NO null 252 column_name VARCHAR(256) NO PRI null 253 ordinal_position INT UNSIGNED(32) NO null 254 options TEXT(0) YES null 255 index_table_name VARCHAR(5000) YES null 256 drop account if exists account1; 257 drop account if exists inner_account; 258 drop account if exists accx11; 259 drop role if exists revoke_role_1; 260 set global enable_privilege_cache = on; 261 desc mo_catalog.mo_stages; 262 Field Type Null Key Default Extra Comment 263 stage_id INT UNSIGNED(32) NO PRI null 264 stage_name VARCHAR(64) YES UNI null 265 url TEXT(0) YES null 266 stage_credentials TEXT(0) YES null 267 stage_status VARCHAR(64) YES null 268 created_time TIMESTAMP(0) YES null 269 comment TEXT(0) YES null 270 create account ac_1 ADMIN_NAME 'admin' IDENTIFIED BY '111'; 271 create database sys_db1; 272 create table sys_db1.sys_t1(c1 char); 273 create view sys_db1.sys_v1 as select * from sys_db1.sys_t1; 274 create table sys_db1.test01 ( 275 emp_no int not null, 276 birth_date date not null, 277 first_name varchar(14) not null, 278 last_name varchar(16) not null, 279 gender varchar(5) not null, 280 hire_date date not null, 281 primary key (emp_no) 282 ) partition by range columns (emp_no)( 283 partition p01 values less than (100001), 284 partition p02 values less than (200001), 285 partition p03 values less than (300001), 286 partition p04 values less than (400001) 287 ); 288 create database ac_db; 289 create table ac_db.ac_t1(c1 int); 290 create view ac_db.ac_v1 as select * from ac_db.ac_t1; 291 create table ac_db.test02 ( 292 emp_no int not null, 293 birth_date date not null, 294 first_name varchar(14) not null, 295 last_name varchar(16) not null, 296 gender varchar(5) not null, 297 hire_date date not null, 298 primary key (emp_no) 299 ) partition by range columns (emp_no)( 300 partition p01 values less than (100001), 301 partition p02 values less than (200001), 302 partition p03 values less than (300001), 303 partition p04 values less than (400001) 304 ); 305 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_schema="ac_db" and table_name='ac_t1'; 306 table_catalog table_schema table_name column_name 307 def ac_db ac_t1 __mo_fake_pk_col 308 def ac_db ac_t1 c1 309 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_schema="ac_db" and table_name='test02'; 310 table_catalog table_schema table_name column_name 311 def ac_db test02 birth_date 312 def ac_db test02 emp_no 313 def ac_db test02 first_name 314 def ac_db test02 gender 315 def ac_db test02 hire_date 316 def ac_db test02 last_name 317 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_schema="sys_db1"; 318 table_catalog table_schema table_name column_name 319 select count(*),table_name, column_name from information_schema.columns group by table_name, column_name having count(*)>1; 320 count(*) table_name column_name 321 select * from information_schema.schemata where schema_name='ac_db'; 322 catalog_name schema_name default_character_set_name default_collation_name sql_path default_encryption 323 def ac_db utf8mb4 utf8mb4_0900_ai_ci null NO 324 select * from information_schema.schemata where schema_name='sys_db1'; 325 catalog_name schema_name default_character_set_name default_collation_name sql_path default_encryption 326 select count(*),schema_name from information_schema.schemata group by schema_name having count(*)>1; 327 count(*) schema_name 328 select table_schema,table_name from information_schema.tables where table_name='sys_t1'; 329 table_schema table_name 330 select table_schema,table_name from information_schema.tables where table_name='ac_t1'; 331 table_schema table_name 332 ac_db ac_t1 333 select count(*),table_name from information_schema.tables group by table_name having count(*) >1; 334 count(*) table_name 335 select * from information_schema.views where table_name='ac_v1'; 336 table_catalog table_schema table_name view_definition check_option is_updatable definer security_type character_set_client collation_connection 337 def ac_db ac_v1 create view ac_db.ac_v1 as select * from ac_db.ac_t1; NONE YES admin@localhost DEFINER utf8mb4 utf8mb4_0900_ai_ci 338 select * from information_schema.views where table_name='sys_v1'; 339 table_catalog table_schema table_name view_definition check_option is_updatable definer security_type character_set_client collation_connection 340 select count(*),table_name from information_schema.views group by table_name having count(*)>1; 341 count(*) table_name 342 select count(*) from information_schema.partitions where table_schema='ac_db' and table_name='test02'; 343 count(*) 344 4 345 select table_schema,table_name,partition_name from information_schema.partitions where table_schema='sys_db1'; 346 table_schema table_name partition_name 347 select count(*),table_schema,table_name,partition_name from information_schema.partitions group by table_schema,table_name,partition_name having count(*) >1; 348 count(*) table_schema table_name partition_name 349 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_name='ac_t1'; 350 table_catalog table_schema table_name column_name 351 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_name='sys_t1'; 352 table_catalog table_schema table_name column_name 353 def sys_db1 sys_t1 __mo_fake_pk_col 354 def sys_db1 sys_t1 c1 355 select count(*),table_name, column_name from information_schema.columns group by table_name, column_name having count(*)>1; 356 count(*) table_name column_name 357 select * from information_schema.schemata where schema_name='ac_db'; 358 catalog_name schema_name default_character_set_name default_collation_name sql_path default_encryption 359 select * from information_schema.schemata where schema_name='sys_db1'; 360 catalog_name schema_name default_character_set_name default_collation_name sql_path default_encryption 361 def sys_db1 utf8mb4 utf8mb4_0900_ai_ci null NO 362 select count(*),schema_name from information_schema.schemata group by schema_name having count(*)>1; 363 count(*) schema_name 364 select table_schema,table_name from information_schema.tables where table_name='sys_t1'; 365 table_schema table_name 366 sys_db1 sys_t1 367 select table_schema,table_name from information_schema.tables where table_name='ac_t1'; 368 table_schema table_name 369 select count(*),table_name from information_schema.tables group by table_name having count(*) >1; 370 count(*) table_name 371 select * from information_schema.views where table_name='sys_v1'; 372 table_catalog table_schema table_name view_definition check_option is_updatable definer security_type character_set_client collation_connection 373 def sys_db1 sys_v1 create view sys_db1.sys_v1 as select * from sys_db1.sys_t1; NONE YES dump@localhost DEFINER utf8mb4 utf8mb4_0900_ai_ci 374 select * from information_schema.views where table_name='ac_v1'; 375 table_catalog table_schema table_name view_definition check_option is_updatable definer security_type character_set_client collation_connection 376 select count(*),table_name from information_schema.views group by table_name having count(*)>1; 377 count(*) table_name 378 select count(*) from information_schema.partitions where table_schema='sys_db1' and table_name='test01'; 379 count(*) 380 4 381 select table_schema,table_name from information_schema.partitions where table_schema='ac_db'; 382 table_schema table_name 383 select count(*),table_schema,table_name,partition_name from information_schema.partitions group by table_schema,table_name,partition_name having count(*) >1; 384 count(*) table_schema table_name partition_name 385 create user 'sys_user' identified by '123456'; 386 create role 'sys_role'; 387 grant all on account * to 'sys_role'; 388 grant OWNERSHIP on database *.* to sys_role; 389 grant select on table *.* to sys_role; 390 grant sys_role to sys_user; 391 create user 'ac_user' identified by '123456'; 392 create role 'ac_role'; 393 grant all on account * to 'ac_role'; 394 grant OWNERSHIP on database *.* to ac_role; 395 grant select on table *.* to ac_role; 396 grant ac_role to ac_user; 397 create database user_db; 398 create table user_db.user_t1(c1 int,c2 varchar); 399 create view user_db.sysuser_v1 as select * from user_db.user_t1; 400 create table user_db.test02 ( 401 emp_no int not null, 402 birth_date date not null, 403 first_name varchar(14) not null, 404 last_name varchar(16) not null, 405 gender varchar(5) not null, 406 hire_date date not null, 407 primary key (emp_no) 408 ) partition by range columns (emp_no)( 409 partition p01 values less than (100001), 410 partition p02 values less than (200001), 411 partition p03 values less than (300001), 412 partition p04 values less than (400001) 413 ); 414 create database acuser_db; 415 create table acuser_db.acuser_t1(c1 int,c2 varchar); 416 create view acuser_db.acuser_v1 as select * from acuser_db.acuser_t1; 417 create table acuser_db.test ( 418 emp_no int not null, 419 birth_date date not null, 420 first_name varchar(14) not null, 421 last_name varchar(16) not null, 422 gender varchar(5) not null, 423 hire_date date not null, 424 primary key (emp_no) 425 ) partition by range columns (emp_no)( 426 partition p01 values less than (100001), 427 partition p02 values less than (200001), 428 partition p03 values less than (300001), 429 partition p04 values less than (400001) 430 ); 431 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_schema="acuser_db" and table_name='acuser_t1'; 432 table_catalog table_schema table_name column_name 433 def acuser_db acuser_t1 __mo_fake_pk_col 434 def acuser_db acuser_t1 c1 435 def acuser_db acuser_t1 c2 436 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_schema="user_db"; 437 table_catalog table_schema table_name column_name 438 select count(*),table_name, column_name from information_schema.columns group by table_name, column_name having count(*)>1; 439 count(*) table_name column_name 440 select * from information_schema.schemata where schema_name='acuser_db'; 441 catalog_name schema_name default_character_set_name default_collation_name sql_path default_encryption 442 def acuser_db utf8mb4 utf8mb4_0900_ai_ci null NO 443 select * from information_schema.schemata where schema_name='user_db1'; 444 catalog_name schema_name default_character_set_name default_collation_name sql_path default_encryption 445 select count(*),schema_name from information_schema.schemata group by schema_name having count(*)>1; 446 count(*) schema_name 447 select table_schema,table_name from information_schema.tables where table_name='user_t1'; 448 table_schema table_name 449 select table_schema,table_name from information_schema.tables where table_name='acuser_t1'; 450 table_schema table_name 451 acuser_db acuser_t1 452 select count(*),table_name from information_schema.tables group by table_name having count(*) >1; 453 count(*) table_name 454 select table_schema,table_name from information_schema.views where table_name='acuser_v1'; 455 table_schema table_name 456 acuser_db acuser_v1 457 select table_schema,table_name from information_schema.views where table_name='sysuser_v1'; 458 table_schema table_name 459 select count(*),table_name from information_schema.views group by table_name having count(*)>1; 460 count(*) table_name 461 select table_schema,table_name,partition_name from information_schema.partitions where table_schema='acuser_db'; 462 table_schema table_name partition_name 463 acuser_db test p01 464 acuser_db test p02 465 acuser_db test p03 466 acuser_db test p04 467 select table_schema,table_name,partition_name from information_schema.partitions where table_schema='user_db'; 468 table_schema table_name partition_name 469 select count(*),table_schema,table_name,partition_name from information_schema.partitions group by table_schema,table_name,partition_name having count(*) >1; 470 count(*) table_schema table_name partition_name 471 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_schema="user_db" and table_name='user_t1'; 472 table_catalog table_schema table_name column_name 473 def user_db user_t1 __mo_fake_pk_col 474 def user_db user_t1 c1 475 def user_db user_t1 c2 476 select table_catalog,table_schema,table_name,column_name from information_schema.columns where table_schema="acuser_db"; 477 table_catalog table_schema table_name column_name 478 select count(*),table_name, column_name from information_schema.columns group by table_name, column_name having count(*)>1; 479 count(*) table_name column_name 480 select * from information_schema.schemata where schema_name='acuser_db'; 481 catalog_name schema_name default_character_set_name default_collation_name sql_path default_encryption 482 select * from information_schema.schemata where schema_name='user_db'; 483 catalog_name schema_name default_character_set_name default_collation_name sql_path default_encryption 484 def user_db utf8mb4 utf8mb4_0900_ai_ci null NO 485 select count(*),schema_name from information_schema.schemata group by schema_name having count(*)>1; 486 count(*) schema_name 487 select table_schema,table_name from information_schema.tables where table_name='user_t1'; 488 table_schema table_name 489 user_db user_t1 490 select table_schema,table_name from information_schema.tables where table_name='acuser_t1'; 491 table_schema table_name 492 select count(*),table_name from information_schema.tables group by table_name having count(*) >1; 493 count(*) table_name 494 select table_schema,table_name from information_schema.views where table_name='acuser_v1'; 495 table_schema table_name 496 select table_schema,table_name from information_schema.views where table_name='sysuser_v1'; 497 table_schema table_name 498 user_db sysuser_v1 499 select count(*),table_name from information_schema.views group by table_name having count(*)>1; 500 count(*) table_name 501 select table_schema,table_name,partition_name from information_schema.partitions where table_schema='acuser_db'; 502 table_schema table_name partition_name 503 select table_schema,table_name,partition_name from information_schema.partitions where table_schema='user_db'; 504 table_schema table_name partition_name 505 user_db test02 p01 506 user_db test02 p02 507 user_db test02 p03 508 user_db test02 p04 509 select count(*),table_schema,table_name,partition_name from information_schema.partitions group by table_schema,table_name,partition_name having count(*) >1; 510 count(*) table_schema table_name partition_name 511 drop database sys_db1; 512 drop database user_db; 513 drop account ac_1; 514 drop user sys_user; 515 drop role sys_role;