提交 23c7e1fe 编写于 作者: L LINxiansheng 提交者: wangzelin.wzl

Fix opensource mysql test cases

上级 2532407a
......@@ -177,7 +177,7 @@ collation(substr(X'41', 2))
binary
select collation(trim('a' from null)) from coll_test;
collation(trim('a' from null))
utf8mb4_general_ci
binary
select collation(trim('a' from uc)) from coll_test;
collation(trim('a' from uc))
utf8mb4_general_ci
......@@ -501,10 +501,4 @@ utf8mb4_bin
select collation(cast('A' as char)), cast('A' as char) < 'a';
collation(cast('A' as char)) cast('A' as char) < 'a'
utf8mb4_bin 1
SELECT collation(CAST('A' AS char CHAR SET utf8mb4));
collation(CAST('A' AS char CHAR SET utf8mb4))
utf8mb4_general_ci
SELECT collation(CAST('A' AS char CHAR SET binary));
collation(CAST('A' AS char CHAR SET binary))
binary
drop table coll_test;
......@@ -163,28 +163,28 @@ export_set(2.4,"y","n")
n,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n
select export_set(9223372036854775808,"Y","N");
export_set(9223372036854775808,"Y","N")
N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set(9223372036854775809,"Y","N");
export_set(9223372036854775809,"Y","N")
Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set(-9223372036854775808,"Y","N");
export_set(-9223372036854775808,"Y","N")
N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
select export_set(18446744073709551615,"Y","N");
export_set(18446744073709551615,"Y","N")
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set(9223372036854775808,"Y","N",",",92233720368547758080000000000);
export_set(9223372036854775808,"Y","N",",",92233720368547758080000000000)
N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set(9223372036854775808,"Y","N",",",9223372036854775808);
export_set(9223372036854775808,"Y","N",",",9223372036854775808)
N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set(9223372036854775809,"Y","N",",",9223372036854775809);
export_set(9223372036854775809,"Y","N",",",9223372036854775809)
Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set(9223372036854775809,"Y","N",",",9223372036854775809000000000000);
export_set(9223372036854775809,"Y","N",",",9223372036854775809000000000000)
Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set(-9223372036854775808,"Y","N",",",-9223372036854775808);
export_set(-9223372036854775808,"Y","N",",",-9223372036854775808)
N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
......@@ -193,10 +193,10 @@ export_set(-9223372036854775808,"Y","N",",",-9223372036854775808000000000)
N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,Y
select export_set(18446744073709551615,"Y","N",",",18446744073709551615);
export_set(18446744073709551615,"Y","N",",",18446744073709551615)
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set(18446744073709551615,"Y","N",",",1844674407370955161500000000000);
export_set(18446744073709551615,"Y","N",",",1844674407370955161500000000000)
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,N
select export_set();
ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
select export_set(1);
......@@ -313,3 +313,25 @@ desc t1;
Field Type Null Key Default Extra
export_set(99,"1","11","111",77) varchar(317) YES NULL
drop table t1;
drop table if exists T_36895309;
CREATE TABLE T_36895309(A_0 INT,A_1 INT,A_2 VARCHAR(20),A_3 FLOAT,A_4 DATE);
INSERT INTO T_36895309 VALUES(1,1,'A',1.23,'1999-09-09'),(2,-1,'nb',3.21,'1111-11-11'),(3,0,'#',6666.6666,'11-11-11'),(4,NULL,NULL,NULL,NULL);
SELECT EXPORT_SET(A_2,'Y','N',',',5) FROM T_36895309 ;
EXPORT_SET(A_2,'Y','N',',',5)
N,N,N,N,N
N,N,N,N,N
N,N,N,N,N
NULL
SELECT EXPORT_SET(A_3,'Y','N',',',5) FROM T_36895309 ;
EXPORT_SET(A_3,'Y','N',',',5)
Y,N,N,N,N
Y,Y,N,N,N
Y,Y,N,Y,N
NULL
SELECT EXPORT_SET(A_4,'Y','N',',',5) FROM T_36895309 ;
EXPORT_SET(A_4,'Y','N',',',5)
Y,N,Y,Y,Y
Y,Y,Y,N,N
Y,Y,Y,N,N
NULL
drop table T_36895309;
--disable_query_log
set @@session.explicit_defaults_for_timestamp=off;
--enable_query_log
# ....yzf....Fri, 21 Aug 2015....17:55....
# set-up
--disable_warnings
......@@ -247,10 +246,6 @@ select collation(cast(1 as char));
SELECT collation(DATE_FORMAT('2009-10-04 22:23:00', '%W %M %Y'));
select collation(cast('A' as char)), cast('A' as char) < 'a';
#set utf8 binary collation set
SELECT collation(CAST('A' AS char CHAR SET utf8mb4));
SELECT collation(CAST('A' AS char CHAR SET binary));
################################################################
# tear-down
drop table coll_test;
......@@ -6,7 +6,6 @@ set @@session.explicit_defaults_for_timestamp=off;
--enable_abort_on_error
--echo ================ expression export_set ================
# 基本检查
select export_set(0,"Y","N","-",5);
select export_set(7,"Y","N","-",5);
select export_set(11,"Y","N","-",5);
......@@ -23,7 +22,6 @@ select export_set(100,"Y","N",".",5);
select export_set(100,"Y","N",".",7);
select export_set(100,"Y","N",".",10);
# 参数NULL检查
select export_set(null,"Y","N",".",5);
select export_set(0,"Y","N",".",5);
select export_set(5,null,"N",".",5);
......@@ -43,7 +41,6 @@ select export_set(1000,'',1);
select export_set(1000,1,'');
select export_set(1000,1,0,'');
# 默认参数检查
select export_set(8,"Y","N");
select export_set(88,"Y","N");
select export_set(888,"Y","N");
......@@ -54,7 +51,6 @@ select export_set(8,"Y","N",'+');
select export_set(8,"1","0",'*');
select export_set(8,"X","Y",'*');
# 参数类型不同
select export_set(7,1,0,"-",5);
select export_set(7,11,00,"-",5);
select export_set(7,111,000,"-",5);
......@@ -68,9 +64,6 @@ select export_set(2.4,1,0);
select export_set(1.4,"y","n");
select export_set(2.4,"y","n");
# 边界检查
# 超过uint64的上界,int64的下界,ob对溢出的处理和mysql不同,这是mysql的bug,不兼容
# 目前保证-9223372036854775808到18446744073709551615与mysql兼容
# select export_set(1111111111111111111111111111111111111111111111111111,"Y","N");
select export_set(9223372036854775808,"Y","N");
select export_set(9223372036854775809,"Y","N");
......@@ -85,7 +78,6 @@ select export_set(-9223372036854775808,"Y","N",",",-9223372036854775808000000000
select export_set(18446744073709551615,"Y","N",",",18446744073709551615);
select export_set(18446744073709551615,"Y","N",",",1844674407370955161500000000000);
# 参数错误检查
--error 1582
select export_set();
--error 1582
......@@ -105,7 +97,6 @@ select export_set(1,2,3,a);
--error 1054
select export_set(1,2,3,4,a);
# 用表数据做参数
--disable_warnings
drop table if exists test;
--enable_warnings
......@@ -149,3 +140,13 @@ create table t1 as select export_set(99,"1","11","111",77);
desc t1;
drop table t1;
--disable_warnings
drop table if exists T_36895309;
--enable_warnings
CREATE TABLE T_36895309(A_0 INT,A_1 INT,A_2 VARCHAR(20),A_3 FLOAT,A_4 DATE);
INSERT INTO T_36895309 VALUES(1,1,'A',1.23,'1999-09-09'),(2,-1,'nb',3.21,'1111-11-11'),(3,0,'#',6666.6666,'11-11-11'),(4,NULL,NULL,NULL,NULL);
SELECT EXPORT_SET(A_2,'Y','N',',',5) FROM T_36895309 ;
SELECT EXPORT_SET(A_3,'Y','N',',',5) FROM T_36895309 ;
SELECT EXPORT_SET(A_4,'Y','N',',',5) FROM T_36895309 ;
drop table T_36895309;
......@@ -78,9 +78,9 @@ TABLE_NAME varchar(256) NO
COLUMN_NAME varchar(128) NO
ORDINAL_POSITION bigint(20) NO
POSITION_IN_UNIQUE_CONSTRAINT null NO
REFERENCED_TABLE_SCHEMA null NO
REFERENCED_TABLE_NAME null NO
REFERENCED_COLUMN_NAME null NO
REFERENCED_TABLE_SCHEMA varchar(128) NO
REFERENCED_TABLE_NAME varchar(256) NO
REFERENCED_COLUMN_NAME varchar(128) NO
desc partitions;
Field Type Null Key Default Extra
TABLE_CATALOG varchar(4096) NO
......@@ -132,6 +132,7 @@ SCHEMA_NAME varchar(128) NO
DEFAULT_CHARACTER_SET_NAME varchar(7) NO
DEFAULT_COLLATION_NAME varchar(18) NO
SQL_PATH null NO
DEFAULT_ENCRYPTION varchar(2) NO
desc session_status;
Field Type Null Key Default Extra
VARIABLE_NAME varchar(128) NO
......@@ -181,7 +182,7 @@ TABLE_CATALOG varchar(3) NO
TABLE_SCHEMA varchar(128) NO
TABLE_NAME varchar(256) NO
TABLE_TYPE varchar(12) NO
ENGINE null NO
ENGINE varchar(9) NO
VERSION null NO
ROW_FORMAT null NO
TABLE_ROWS decimal(20,0) NO NULL
......@@ -248,7 +249,7 @@ COLUMNS CREATE VIEW `COLUMNS` AS SELECT TABLE_CATALOG,
PRIVILEGES,
COLUMN_COMMENT,
GENERATION_EXPRESSION
FROM OCEANBASE.__ALL_VIRTUAL_INFORMATION_COLUMNS utf8mb4 utf8mb4_general_ci
FROM OCEANBASE.__ALL_VIRTUAL_INFORMATION_COLUMNS where 0 = sys_privilege_check('table_acc', effective_tenant_id(), table_schema, table_name) utf8mb4 utf8mb4_general_ci
show create table global_status;
Table Create Table
GLOBAL_STATUS CREATE TABLE `GLOBAL_STATUS` (
......@@ -260,7 +261,7 @@ View Create View character_set_client collation_connection
GLOBAL_VARIABLES CREATE VIEW `GLOBAL_VARIABLES` AS SELECT `variable_name` as VARIABLE_NAME, `value` as VARIABLE_VALUE FROM oceanbase.__tenant_virtual_global_variable utf8mb4 utf8mb4_general_ci
show create table key_column_usage;
View Create View character_set_client collation_connection
KEY_COLUMN_USAGE CREATE VIEW `KEY_COLUMN_USAGE` AS (select /*+ READ_CONSISTENCY(WEAK) */ 'def' as CONSTRAINT_CATALOG, c.database_name as CONSTRAINT_SCHEMA, 'PRIMARY' as CONSTRAINT_NAME, 'def' as TABLE_CATALOG, c.database_name as TABLE_SCHEMA, a.table_name as TABLE_NAME, b.column_name as COLUMN_NAME, b.rowkey_position as ORDINAL_POSITION, NULL as POSITION_IN_UNIQUE_CONSTRAINT, NULL as REFERENCED_TABLE_SCHEMA, NULL as REFERENCED_TABLE_NAME, NULL as REFERENCED_COLUMN_NAME from oceanbase.__all_virtual_table a inner join oceanbase.__all_virtual_column b on a.table_id = b.table_id inner join oceanbase.__all_virtual_database c on a.database_id = c.database_id where a.tenant_id = effective_tenant_id() and b.tenant_id = effective_tenant_id() and c.tenant_id = effective_tenant_id() and c.in_recyclebin = 0 and c.database_name != '__recyclebin' and b.rowkey_position > 0 and b.column_id >= 16 and a.table_type != 5 and b.column_flags & (0x1 << 8) = 0) union (select /*+ READ_CONSISTENCY(WEAK) */ 'def' as CONSTRAINT_CATALOG, d.database_name as CONSTRAINT_SCHEMA, substr(a.table_name, 2 + length(substring_index(a.table_name,'_',4))) as CONSTRAINT_NAME, 'def' as TABLE_CATALOG, d.database_name as TABLE_SCHEMA, c.table_name as TABLE_NAME, b.column_name as COLUMN_NAME, b.index_position as ORDINAL_POSITION, NULL as POSITION_IN_UNIQUE_CONSTRAINT, NULL as REFERENCED_TABLE_SCHEMA, NULL as REFERENCED_TABLE_NAME, NULL as REFERENCED_COLUMN_NAME from oceanbase.__all_virtual_table a inner join oceanbase.__all_virtual_column b on a.table_id = b.table_id inner join oceanbase.__all_virtual_table c on a.data_table_id = c.table_id inner join oceanbase.__all_virtual_database d on c.database_id = d.database_id where a.tenant_id = effective_tenant_id() and b.tenant_id = effective_tenant_id() and c.tenant_id = effective_tenant_id() and d.in_recyclebin = 0 and d.tenant_id = effective_tenant_id() and d.database_name != '__recyclebin' and a.table_type = 5 and a.index_type in (2, 4, 8) and b.index_position > 0) utf8mb4 utf8mb4_general_ci
KEY_COLUMN_USAGE CREATE VIEW `KEY_COLUMN_USAGE` AS (select /*+ READ_CONSISTENCY(WEAK) */ 'def' as CONSTRAINT_CATALOG, c.database_name as CONSTRAINT_SCHEMA, 'PRIMARY' as CONSTRAINT_NAME, 'def' as TABLE_CATALOG, c.database_name as TABLE_SCHEMA, a.table_name as TABLE_NAME, b.column_name as COLUMN_NAME, b.rowkey_position as ORDINAL_POSITION, NULL as POSITION_IN_UNIQUE_CONSTRAINT, NULL as REFERENCED_TABLE_SCHEMA, NULL as REFERENCED_TABLE_NAME, NULL as REFERENCED_COLUMN_NAME from oceanbase.__all_virtual_table a inner join oceanbase.__all_virtual_column b on a.table_id = b.table_id inner join oceanbase.__all_virtual_database c on a.database_id = c.database_id where a.tenant_id = effective_tenant_id() and b.tenant_id = effective_tenant_id() and c.tenant_id = effective_tenant_id() and c.in_recyclebin = 0 and c.database_name != '__recyclebin' and b.rowkey_position > 0 and b.column_id >= 16 and a.table_type != 5 and b.column_flags & (0x1 << 8) = 0) union all (select /*+ READ_CONSISTENCY(WEAK) */ 'def' as CONSTRAINT_CATALOG, d.database_name as CONSTRAINT_SCHEMA, substr(a.table_name, 2 + length(substring_index(a.table_name,'_',4))) as CONSTRAINT_NAME, 'def' as TABLE_CATALOG, d.database_name as TABLE_SCHEMA, c.table_name as TABLE_NAME, b.column_name as COLUMN_NAME, b.index_position as ORDINAL_POSITION, NULL as POSITION_IN_UNIQUE_CONSTRAINT, NULL as REFERENCED_TABLE_SCHEMA, NULL as REFERENCED_TABLE_NAME, NULL as REFERENCED_COLUMN_NAME from oceanbase.__all_virtual_table a inner join oceanbase.__all_virtual_column b on a.table_id = b.table_id inner join oceanbase.__all_virtual_table c on a.data_table_id = c.table_id inner join oceanbase.__all_virtual_database d on c.database_id = d.database_id where a.tenant_id = effective_tenant_id() and b.tenant_id = effective_tenant_id() and c.tenant_id = effective_tenant_id() and d.in_recyclebin = 0 and d.tenant_id = effective_tenant_id() and d.database_name != '__recyclebin' and a.table_type = 5 and a.index_type in (2, 4, 8) and b.index_position > 0) union all (select /*+ READ_CONSISTENCY(WEAK) */ 'def' as CONSTRAINT_CATALOG, d.database_name as CONSTRAINT_SCHEMA, f.foreign_key_name as CONSTRAINT_NAME, 'def' as TABLE_CATALOG, d.database_name as TABLE_SCHEMA, t.table_name as TABLE_NAME, c.column_name as COLUMN_NAME, fc.position as ORDINAL_POSITION, NULL as POSITION_IN_UNIQUE_CONSTRAINT, /* POSITION_IN_UNIQUE_CONSTRAINT is not supported now */ d2.database_name as REFERENCED_TABLE_SCHEMA, t2.table_name as REFERENCED_TABLE_NAME, c2.column_name as REFERENCED_COLUMN_NAME from oceanbase.__all_virtual_foreign_key f inner join oceanbase.__all_virtual_table t on f.child_table_id = t.table_id inner join oceanbase.__all_virtual_database d on t.database_id = d.database_id inner join oceanbase.__all_virtual_foreign_key_column fc on f.foreign_key_id = fc.foreign_key_id inner join oceanbase.__all_virtual_column c on fc.child_column_id = c.column_id and t.table_id = c.table_id inner join oceanbase.__all_virtual_table t2 on f.parent_table_id = t2.table_id inner join oceanbase.__all_virtual_database d2 on t2.database_id = d2.database_id inner join oceanbase.__all_virtual_column c2 on fc.parent_column_id = c2.column_id and t2.table_id = c2.table_id where f.tenant_id = effective_tenant_id() and fc.tenant_id = effective_tenant_id() and t.tenant_id = effective_tenant_id() and d.tenant_id = effective_tenant_id() and c.tenant_id = effective_tenant_id() and t2.tenant_id = effective_tenant_id() and d2.tenant_id = effective_tenant_id() and c2.tenant_id = effective_tenant_id()) utf8mb4 utf8mb4_general_ci
show create table partitions;
Table Create Table
PARTITIONS CREATE TABLE `PARTITIONS` (
......@@ -304,7 +305,7 @@ SCHEMA_PRIVILEGES CREATE TABLE `SCHEMA_PRIVILEGES` (
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = COMPACT COMPRESSION = 'none' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 10 TABLEGROUP = 'oceanbase'
show create table schemata;
View Create View character_set_client collation_connection
SCHEMATA CREATE VIEW `SCHEMATA` AS SELECT 'def' AS CATALOG_NAME, DATABASE_NAME AS SCHEMA_NAME, 'utf8mb4' AS DEFAULT_CHARACTER_SET_NAME, 'utf8mb4_general_ci' AS DEFAULT_COLLATION_NAME, NULL AS SQL_PATH FROM oceanbase.__all_virtual_database a WHERE a.tenant_id = effective_tenant_id() and in_recyclebin = 0 and database_name != '__recyclebin' utf8mb4 utf8mb4_general_ci
SCHEMATA CREATE VIEW `SCHEMATA` AS SELECT 'def' AS CATALOG_NAME, DATABASE_NAME AS SCHEMA_NAME, 'utf8mb4' AS DEFAULT_CHARACTER_SET_NAME, 'utf8mb4_general_ci' AS DEFAULT_COLLATION_NAME, NULL AS SQL_PATH, 'NO' as DEFAULT_ENCRYPTION FROM oceanbase.__all_virtual_database a WHERE a.tenant_id = effective_tenant_id() and in_recyclebin = 0 and database_name != '__recyclebin' utf8mb4 utf8mb4_general_ci
show create table session_status;
Table Create Table
SESSION_STATUS CREATE TABLE `SESSION_STATUS` (
......@@ -342,7 +343,7 @@ TABLE_PRIVILEGES CREATE TABLE `TABLE_PRIVILEGES` (
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = COMPACT COMPRESSION = 'none' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 10 TABLEGROUP = 'oceanbase'
show create table tables;
View Create View character_set_client collation_connection
TABLES CREATE VIEW `TABLES` AS select /*+ READ_CONSISTENCY(WEAK), use_merge(b, c, d, e)*/ 'def' as TABLE_CATALOG, b.database_name as TABLE_SCHEMA, a.table_name as TABLE_NAME, case when a.database_id & 0xFFFFFFFFFF = 2 then 'SYSTEM VIEW' when (a.table_type = 1 or a.table_type = 4) then 'VIEW' when a.table_type = 2 then 'SYSTEM TABLE' when a.table_type = 1 then 'INDEX' else 'BASE TABLE' end as TABLE_TYPE, NULL as ENGINE, NULL as VERSION, NULL as ROW_FORMAT, sum(c.row_count) as TABLE_ROWS, case when sum(c.row_count) = 0 then 0 else sum(c.data_size)/sum(c.row_count) end as AVG_ROW_LENGTH, sum(c.data_size) as DATA_LENGTH, NULL as MAX_DATA_LENGTH, NULL as INDEX_LENGTH, NULL as DATA_FREE, NULL as AUTO_INCREMENT, a.gmt_create as CREATE_TIME, a.gmt_modified as UPDATE_TIME, NULL as CHECK_TIME, d.collation as TABLE_COLLATION, cast(NULL as unsigned) as CHECKSUM, NULL as CREATE_OPTIONS, a.comment as TABLE_COMMENT from oceanbase.__all_virtual_table a inner join oceanbase.__all_virtual_database b on a.database_id = b.database_id left join oceanbase.__all_virtual_tenant_partition_meta_table c on a.table_id = c.table_id and c.tenant_id = effective_tenant_id() and a.tenant_id = c.tenant_id and c.role = 1 inner join oceanbase.__all_collation d on a.collation_type = d.id where a.tenant_id = effective_tenant_id() and b.tenant_id = effective_tenant_id() and a.table_type != 5 and b.database_name != '__recyclebin' and b.in_recyclebin = 0 group by a.table_id, b.database_name, a.table_name, a.table_type, a.gmt_create, a.gmt_modified, d.collation, a.comment utf8mb4 utf8mb4_general_ci
TABLES CREATE VIEW `TABLES` AS select /*+ READ_CONSISTENCY(WEAK), use_merge(b, c, d, e)*/ 'def' as TABLE_CATALOG, b.database_name as TABLE_SCHEMA, a.table_name as TABLE_NAME, case when a.database_id & 0xFFFFFFFFFF = 2 then 'SYSTEM VIEW' when (a.table_type = 1 or a.table_type = 4) then 'VIEW' when a.table_type = 2 then 'SYSTEM TABLE' when a.table_type = 1 then 'INDEX' else 'BASE TABLE' end as TABLE_TYPE, 'OceanBase' as ENGINE, NULL as VERSION, NULL as ROW_FORMAT, sum(c.row_count) as TABLE_ROWS, case when sum(c.row_count) = 0 then 0 else sum(c.data_size)/sum(c.row_count) end as AVG_ROW_LENGTH, sum(c.data_size) as DATA_LENGTH, NULL as MAX_DATA_LENGTH, NULL as INDEX_LENGTH, NULL as DATA_FREE, NULL as AUTO_INCREMENT, a.gmt_create as CREATE_TIME, a.gmt_modified as UPDATE_TIME, NULL as CHECK_TIME, d.collation as TABLE_COLLATION, cast(NULL as unsigned) as CHECKSUM, NULL as CREATE_OPTIONS, a.comment as TABLE_COMMENT from oceanbase.__all_virtual_table a inner join oceanbase.__all_virtual_database b on a.database_id = b.database_id left join oceanbase.__all_virtual_tenant_partition_meta_table c on a.table_id = c.table_id and c.tenant_id = effective_tenant_id() and a.tenant_id = c.tenant_id and c.role = 1 inner join oceanbase.__all_collation d on a.collation_type = d.id where a.tenant_id = effective_tenant_id() and b.tenant_id = effective_tenant_id() and a.table_type != 5 and b.database_name != '__recyclebin' and b.in_recyclebin = 0 and 0 = sys_privilege_check('table_acc', effective_tenant_id(), b.database_name, a.table_name) group by a.table_id, b.database_name, a.table_name, a.table_type, a.gmt_create, a.gmt_modified, d.collation, a.comment utf8mb4 utf8mb4_general_ci
show create table user_privileges;
Table Create Table
USER_PRIVILEGES CREATE TABLE `USER_PRIVILEGES` (
......@@ -353,7 +354,7 @@ USER_PRIVILEGES CREATE TABLE `USER_PRIVILEGES` (
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = COMPACT COMPRESSION = 'none' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 10 TABLEGROUP = 'oceanbase'
show create table views;
View Create View character_set_client collation_connection
VIEWS CREATE VIEW `VIEWS` AS select /*+ READ_CONSISTENCY(WEAK) */ 'def' AS TABLE_CATALOG, d.database_name as TABLE_SCHEMA, t.table_name as TABLE_NAME, t.view_definition as VIEW_DEFINITION, 'NONE' as CHECK_OPTION, case t.view_is_updatable when 1 then 'YES' else 'NO' end as IS_UPDATABLE, 'NONE' as DEFINER, 'NONE' AS SECURITY_TYPE, case t.collation_type when 45 then 'utf8mb4' else 'NONE' end AS CHARACTER_SET_CLIENT, case t.collation_type when 45 then 'utf8mb4_general_ci' else 'NONE' end AS COLLATION_CONNECTION from oceanbase.__all_virtual_table as t join oceanbase.__all_virtual_database as d on t.tenant_id = effective_tenant_id() and d.tenant_id = effective_tenant_id() and t.database_id = d.database_id where (t.table_type = 1 or t.table_type = 4) and d.in_recyclebin = 0 and d.database_name != '__recyclebin' and d.database_name != 'information_schema' and d.database_name != 'oceanbase' utf8mb4 utf8mb4_general_ci
VIEWS CREATE VIEW `VIEWS` AS select /*+ READ_CONSISTENCY(WEAK) */ 'def' AS TABLE_CATALOG, d.database_name as TABLE_SCHEMA, t.table_name as TABLE_NAME, t.view_definition as VIEW_DEFINITION, 'NONE' as CHECK_OPTION, case t.view_is_updatable when 1 then 'YES' else 'NO' end as IS_UPDATABLE, 'NONE' as DEFINER, 'NONE' AS SECURITY_TYPE, case t.collation_type when 45 then 'utf8mb4' else 'NONE' end AS CHARACTER_SET_CLIENT, case t.collation_type when 45 then 'utf8mb4_general_ci' else 'NONE' end AS COLLATION_CONNECTION from oceanbase.__all_virtual_table as t join oceanbase.__all_virtual_database as d on t.tenant_id = effective_tenant_id() and d.tenant_id = effective_tenant_id() and t.database_id = d.database_id where (t.table_type = 1 or t.table_type = 4) and d.in_recyclebin = 0 and d.database_name != '__recyclebin' and d.database_name != 'information_schema' and d.database_name != 'oceanbase' and 0 = sys_privilege_check('table_acc', effective_tenant_id(), d.database_name, t.table_name) utf8mb4 utf8mb4_general_ci
connect conn_sys,$OBMYSQL_MS0,root@sys,,*NO-ONE*,$OBMYSQL_PORT;
drop tenant tt1 force;
drop resource pool mypool1;
......
......@@ -48,6 +48,7 @@ data_type data_type_str data_type_class
44 NCHAR 10
45 ROWID 20
46 LOB 21
47 JSON 22
select data_type, data_type_str, data_type_class from __all_virtual_data_type order by data_type;
data_type data_type_str data_type_class
0 NULL 0
......@@ -97,6 +98,7 @@ data_type data_type_str data_type_class
44 NCHAR 10
45 ROWID 20
46 LOB 21
47 JSON 22
select * from __all_virtual_data_type where data_type = 22;
data_type data_type_str data_type_class
22 VARCHAR 10
......@@ -147,6 +149,7 @@ NVARCHAR2 STRING
NCHAR STRING
ROWID ROWID
LOB LOB
JSON JSON
show create table __all_virtual_data_type;
Table Create Table
__all_virtual_data_type CREATE TABLE `__all_virtual_data_type` (
......
......@@ -22,6 +22,7 @@ data_type_class data_type_class_str
19 INTERVAL
20 ROWID
21 LOB
22 JSON
select data_type_class, data_type_class_str from __all_virtual_data_type_class;
data_type_class data_type_class_str
0 NULL
......@@ -45,6 +46,7 @@ data_type_class data_type_class_str
19 INTERVAL
20 ROWID
21 LOB
22 JSON
select * from __all_virtual_data_type_class where data_type_class = 10;
data_type_class data_type_class_str
10 STRING
......@@ -95,6 +97,7 @@ NVARCHAR2 STRING
NCHAR STRING
ROWID ROWID
LOB LOB
JSON JSON
show create table __all_virtual_data_type_class;
Table Create Table
__all_virtual_data_type_class CREATE TABLE `__all_virtual_data_type_class` (
......
......@@ -26,14 +26,20 @@ name
all_cluster_list
all_server_list
autoinc_cache_refresh_interval
auto_broadcast_location_cache_rate_limit
auto_delete_expired_backup
auto_leader_switch_interval
auto_refresh_location_cache_rate_limit
backup_backup_dest
backup_backup_dest_option
backup_concurrency
backup_dest
backup_dest_option
backup_log_archive_option
backup_net_limit
backup_recovery_window
backup_region
backup_zone
balancer_emergency_percentage
balancer_idle_time
balancer_log_interval
......@@ -51,7 +57,6 @@ clog_disk_usage_limit_percentage
clog_disk_utilization_threshold
clog_max_unconfirmed_log_count
clog_sync_time_warn_threshold
clog_usage_limit_size
cluster
cluster_id
config_additional_dir
......@@ -63,6 +68,8 @@ datafile_size
data_copy_concurrency
data_dir
data_disk_usage_limit_percentage
data_storage_error_tolerance_time
data_storage_warning_tolerance_time
dead_socket_detection_timeout
debug_sync_timeout
default_compress
......@@ -76,6 +83,7 @@ election_blacklist_interval
election_cpu_quota
enable_async_syslog
enable_auto_leader_switch
enable_auto_refresh_location_cache
enable_ddl
enable_early_lock_release
enable_election_group
......@@ -87,7 +95,6 @@ enable_merge_by_turn
enable_monotonic_weak_read
enable_one_phase_commit
enable_perf_event
enable_pg
enable_rebalance
enable_record_trace_id
enable_record_trace_log
......@@ -112,6 +119,7 @@ force_refresh_location_cache_interval
force_refresh_location_cache_threshold
freeze_trigger_percentage
fuse_row_cache_priority
gc_wait_archive
get_leader_candidate_rpc_timeout
global_index_build_single_replica_timeout
global_major_freeze_residual_memory
......@@ -133,6 +141,8 @@ location_cache_cpu_quota
location_cache_expire_time
location_cache_priority
location_cache_refresh_min_interval
location_cache_refresh_rpc_timeout
location_cache_refresh_sql_timeout
location_fetch_concurrency
location_refresh_thread_count
log_archive_batch_buffer_limit
......@@ -175,6 +185,7 @@ net_thread_count
obconfig_url
ob_enable_batched_multi_statement
ob_event_history_recycle_interval
ob_proxy_readonly_transaction_routing_policy
ob_ssl_invited_common_names
open_cursors
partition_table_check_interval
......@@ -207,6 +218,7 @@ row_purge_thread_count
rpc_port
rpc_timeout
schema_history_expire_time
schema_history_recycle_interval
server_balance_cpu_mem_tolerance_percent
server_balance_critical_disk_waterlevel
server_balance_disk_tolerance_percent
......@@ -268,6 +280,8 @@ zone_merge_concurrency
zone_merge_order
zone_merge_timeout
_alter_column_mode
_auto_drop_tenant_if_restore_failed
_auto_update_reserved_backup_timestamp
_backup_idle_time
_backup_retry_timeout
_bloom_filter_enabled
......@@ -277,6 +291,9 @@ _chunk_row_store_mem_limit
_clog_aggregation_buffer_amount
_create_table_partition_distribution_strategy
_data_storage_io_timeout
_enable_block_file_punch_hole
_enable_compaction_diagnose
_enable_defensive_check
_enable_easy_keepalive
_enable_fast_commit
_enable_filter_push_down_storage
......@@ -288,7 +305,6 @@ _enable_oracle_priv_check
_enable_parallel_minor_merge
_enable_plan_cache_mem_diagnosis
_enable_sparse_row
_enable_split_partition
_enable_static_typing_engine
_flush_clog_aggregation_buffer_timeout
_follower_replica_merge_level
......@@ -313,6 +329,7 @@ _ob_elr_fast_freeze_threshold
_ob_enable_fast_freeze
_ob_enable_log_replica_strict_recycle_mode
_ob_enable_prepared_statement
_ob_enable_px_for_inner_sql
_ob_get_gts_ahead_interval
_ob_minor_merge_schedule_interval
_ob_plan_cache_gc_strategy
......@@ -331,7 +348,6 @@ _px_message_compression
_recyclebin_object_purge_frequency
_restore_idle_time
_rpc_checksum
_schema_history_recycle_interval
_single_zone_deployment_on
_sort_area_size
_temporary_file_io_area_size
......@@ -342,7 +358,6 @@ _xa_gc_timeout
__balance_controller
__easy_memory_limit
__easy_memory_reserved_percentage
__enable_block_receiving_clog
__enable_identical_partition_distribution
__enable_small_tenant
__min_full_resource_pool_memory
......
......@@ -182,7 +182,16 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
305 __all_res_mgr_plan 0 1099511627777 1
306 __all_res_mgr_directive 0 1099511627777 1
307 __all_res_mgr_mapping_rule 0 1099511627777 1
310 __all_backup_backuppiece_job 0 1099511627777 1
311 __all_backup_backuppiece_job_history 0 1099511627777 1
312 __all_backup_backuppiece_task 0 1099511627777 1
313 __all_backup_backuppiece_task_history 0 1099511627777 1
314 __all_backup_piece_files 0 1099511627777 1
315 __all_backup_set_files 0 1099511627777 1
316 __all_res_mgr_consumer_group 0 1099511627777 1
317 __all_backup_info 0 1099511627777 1
318 __all_backup_log_archive_status_v2 0 1099511627777 1
321 __all_backup_backup_log_archive_status_v2 0 1099511627777 1
10001 __tenant_virtual_all_table 2 1099511627777 1
10002 __tenant_virtual_table_column 2 1099511627777 1
10003 __tenant_virtual_table_index 2 1099511627777 1
......@@ -292,6 +301,8 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
11095 __all_virtual_dump_tenant_info 2 1099511627777 65536
11096 __all_virtual_tenant_parameter_info 2 1099511627777 65536
11099 __all_virtual_dag_warning_history 2 1099511627777 65536
11102 __virtual_show_restore_preview 2 1099511627777 1
11104 __all_virtual_master_key_version_info 2 1099511627777 65536
12001 SESSION_VARIABLES 2 1099511627778 1
12002 TABLE_PRIVILEGES 2 1099511627778 1
12003 USER_PRIVILEGES 2 1099511627778 1
......@@ -426,7 +437,6 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
12165 __all_virtual_objauth 2 1099511627777 1
12166 __all_virtual_objauth_history 2 1099511627777 1
12167 __all_virtual_backup_info 2 1099511627777 1
12168 __all_virtual_backup_log_archive_status 2 1099511627777 1
12170 __all_virtual_backup_task 2 1099511627777 1
12171 __all_virtual_pg_backup_task 2 1099511627777 1
12173 __all_virtual_pg_backup_log_archive_status 2 1099511627777 65536
......@@ -459,7 +469,6 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
12201 __all_virtual_backupset_history_mgr 2 1099511627777 1
12202 __all_virtual_backup_backupset_task 2 1099511627777 1
12203 __all_virtual_pg_backup_backupset_task 2 1099511627777 1
12204 __all_virtual_backup_backup_log_archive_status 2 1099511627777 1
12206 __all_virtual_global_transaction 2 1099511627777 1
15001 ALL_VIRTUAL_TABLE_AGENT 2 1099511627782 1
15002 ALL_VIRTUAL_COLUMN_AGENT 2 1099511627782 1
......@@ -761,6 +770,16 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
21130 CDB_OB_BACKUP_BACKUPSET_TASK 1 1099511627777 1
21131 CDB_OB_BACKUP_BACKUPSET_TASK_HISTORY 1 1099511627777 1
21132 CDB_OB_BACKUP_BACKUP_ARCHIVELOG_SUMMARY 1 1099511627777 1
21136 CDB_OB_BACKUP_PIECE_FILES 1 1099511627777 1
21137 CDB_OB_BACKUP_SET_FILES 1 1099511627777 1
21138 CDB_OB_BACKUP_BACKUPPIECE_JOB 1 1099511627777 1
21139 CDB_OB_BACKUP_BACKUPPIECE_JOB_HISTORY 1 1099511627777 1
21140 CDB_OB_BACKUP_BACKUPPIECE_TASK 1 1099511627777 1
21141 CDB_OB_BACKUP_BACKUPPIECE_TASK_HISTORY 1 1099511627777 1
21142 v$ob_all_clusters 1 1099511627777 1
21143 CDB_OB_BACKUP_ARCHIVELOG 1 1099511627777 1
21144 CDB_OB_BACKUP_BACKUP_ARCHIVELOG 1 1099511627777 1
21150 COLUMN_PRIVILEGES 1 1099511627778 1
25001 DBA_SYNONYMS 1 1099511627782 1
25002 DBA_OBJECTS 1 1099511627782 1
25003 ALL_OBJECTS 1 1099511627782 1
......@@ -1065,9 +1084,9 @@ TABLE_NAME varchar(256) NO
COLUMN_NAME varchar(128) NO
ORDINAL_POSITION bigint(20) NO
POSITION_IN_UNIQUE_CONSTRAINT null NO
REFERENCED_TABLE_SCHEMA null NO
REFERENCED_TABLE_NAME null NO
REFERENCED_COLUMN_NAME null NO
REFERENCED_TABLE_SCHEMA varchar(128) NO
REFERENCED_TABLE_NAME varchar(256) NO
REFERENCED_COLUMN_NAME varchar(128) NO
desc information_schema.PARAMETERS;
Field Type Null Key Default Extra
SPECIFIC_CATALOG varchar(4096) NO def
......@@ -1163,6 +1182,7 @@ SCHEMA_NAME varchar(128) NO
DEFAULT_CHARACTER_SET_NAME varchar(7) NO
DEFAULT_COLLATION_NAME varchar(18) NO
SQL_PATH null NO
DEFAULT_ENCRYPTION varchar(2) NO
desc information_schema.SCHEMA_PRIVILEGES;
Field Type Null Key Default Extra
GRANTEE varchar(81) NO
......@@ -1203,7 +1223,7 @@ TABLE_CATALOG varchar(3) NO
TABLE_SCHEMA varchar(128) NO
TABLE_NAME varchar(256) NO
TABLE_TYPE varchar(12) NO
ENGINE null NO
ENGINE varchar(9) NO
VERSION null NO
ROW_FORMAT null NO
TABLE_ROWS decimal(20,0) NO NULL
......@@ -2657,7 +2677,7 @@ extra_info varchar(512) YES
desc oceanbase.__all_build_index_param;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
job_id bigint(20) NO PRI NULL
snapshot_version bigint(20) NO PRI NULL
execution_id bigint(20) NO PRI NULL
......@@ -2683,7 +2703,7 @@ end_log_timestamp bigint(20) NO NULL
desc oceanbase.__all_clog_history_info_v2;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
table_id bigint(20) unsigned NO PRI NULL
partition_idx bigint(20) NO PRI NULL
partition_cnt bigint(20) NO PRI NULL
......@@ -2704,7 +2724,7 @@ sortlen bigint(20) NO 0
desc oceanbase.__all_column_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
column_id bigint(20) NO PRI NULL
......@@ -2736,7 +2756,7 @@ cur_default_value_v2 varbinary(262144) YES NULL
desc oceanbase.__all_column_stat;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -2759,7 +2779,7 @@ histogram_type bigint(20) NO NULL
desc oceanbase.__all_column_statistic;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -2775,7 +2795,7 @@ last_rebuild_version bigint(20) NO NULL
desc oceanbase.__all_constraint;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
constraint_id bigint(20) NO PRI NULL
......@@ -2789,7 +2809,7 @@ validate_flag tinyint(4) NO 1
desc oceanbase.__all_constraint_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
constraint_id bigint(20) NO PRI NULL
......@@ -2804,7 +2824,7 @@ validate_flag tinyint(4) YES 1
desc oceanbase.__all_database;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
database_id bigint(20) NO PRI NULL
database_name varchar(128) NO
......@@ -2820,7 +2840,7 @@ drop_schema_version bigint(20) NO -1
desc oceanbase.__all_database_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
database_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -2838,7 +2858,7 @@ drop_schema_version bigint(20) YES -1
desc oceanbase.__all_database_privilege;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
user_id bigint(20) NO PRI NULL
database_name varchar(128) NO PRI NULL
......@@ -2856,7 +2876,7 @@ priv_show_view bigint(20) NO 0
desc oceanbase.__all_database_privilege_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
user_id bigint(20) NO PRI NULL
database_name varchar(128) NO PRI NULL
......@@ -2876,14 +2896,14 @@ priv_show_view bigint(20) YES 0
desc oceanbase.__all_ddl_id;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
ddl_id_str varchar(64) NO PRI NULL
ddl_stmt_str longtext NO NULL
desc oceanbase.__all_def_sub_part;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
sub_part_id bigint(20) NO PRI NULL
......@@ -2907,7 +2927,7 @@ tablespace_id bigint(20) NO -1
desc oceanbase.__all_def_sub_part_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
sub_part_id bigint(20) NO PRI NULL
......@@ -2946,7 +2966,7 @@ info varchar(512) NO
desc oceanbase.__all_foreign_key;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
foreign_key_id bigint(20) NO PRI NULL
foreign_key_name varchar(128) NO
......@@ -2962,7 +2982,7 @@ rely_flag tinyint(4) NO 0
desc oceanbase.__all_foreign_key_column;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
foreign_key_id bigint(20) NO PRI NULL
child_column_id bigint(20) NO PRI NULL
......@@ -2971,7 +2991,7 @@ position bigint(20) NO 0
desc oceanbase.__all_foreign_key_column_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
foreign_key_id bigint(20) NO PRI NULL
child_column_id bigint(20) NO PRI NULL
......@@ -2982,7 +3002,7 @@ position bigint(20) YES 0
desc oceanbase.__all_foreign_key_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
foreign_key_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3004,7 +3024,7 @@ frozen_timestamp bigint(20) NO PRI NULL
desc oceanbase.__all_func;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
name varchar(64) NO PRI NULL
ret bigint(20) NO NULL
......@@ -3014,7 +3034,7 @@ type bigint(20) NO NULL
desc oceanbase.__all_func_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
name varchar(64) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3026,7 +3046,7 @@ type bigint(20) YES NULL
desc oceanbase.__all_global_index_data_src;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
index_table_id bigint(20) NO PRI NULL
data_table_id bigint(20) NO PRI NULL
......@@ -3036,7 +3056,7 @@ svr_port bigint(20) NO NULL
desc oceanbase.__all_histogram_stat;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -3049,7 +3069,7 @@ endpoint_repeat_cnt bigint(20) NO NULL
desc oceanbase.__all_immediate_effect_index_sstable;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
index_table_id bigint(20) NO PRI NULL
partition_id, bigint(20) NO PRI NULL
......@@ -3061,7 +3081,7 @@ data_size bigint(20) NO NULL
desc oceanbase.__all_index_build_stat;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
data_table_id bigint(20) NO PRI NULL
index_table_id bigint(20) NO PRI NULL
......@@ -3071,7 +3091,7 @@ schema_version bigint(20) NO NULL
desc oceanbase.__all_index_checksum;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
execution_id bigint(20) NO PRI NULL
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
......@@ -3083,7 +3103,7 @@ checksum_method bigint(20) NO 0
desc oceanbase.__all_index_schedule_task;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
index_table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -3094,7 +3114,7 @@ snapshot_version bigint(20) NO NULL
desc oceanbase.__all_index_wait_transaction_status;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
index_table_id bigint(20) NO PRI NULL
svr_type bigint(20) NO PRI NULL
......@@ -3108,7 +3128,7 @@ schema_version bigint(20) NO NULL
desc oceanbase.__all_local_index_status;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
index_table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -3120,7 +3140,7 @@ role bigint(20) NO 2
desc oceanbase.__all_meta_table;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -3154,7 +3174,7 @@ memstore_percent bigint(20) NO 100
desc oceanbase.__all_ori_schema_version;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
ori_schema_version bigint(20) NO NULL
......@@ -3162,7 +3182,7 @@ building_snapshot bigint(20) NO 0
desc oceanbase.__all_outline;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
outline_id bigint(20) NO PRI NULL
database_id bigint(20) NO NULL
......@@ -3184,7 +3204,7 @@ owner_id bigint(20) YES NULL
desc oceanbase.__all_outline_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
outline_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3207,7 +3227,7 @@ owner_id bigint(20) YES NULL
desc oceanbase.__all_package;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
package_id bigint(20) NO PRI NULL
database_id bigint(20) NO NULL
......@@ -3224,7 +3244,7 @@ route_sql longtext YES NULL
desc oceanbase.__all_package_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
package_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3242,7 +3262,7 @@ route_sql longtext YES NULL
desc oceanbase.__all_part;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
part_id bigint(20) NO PRI NULL
......@@ -3277,7 +3297,7 @@ max_used_sub_part_id bigint(20) NO -1
desc oceanbase.__all_part_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
part_id bigint(20) NO PRI NULL
......@@ -3313,7 +3333,7 @@ max_used_sub_part_id bigint(20) YES -1
desc oceanbase.__all_part_info;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
part_type bigint(20) NO NULL
......@@ -3343,7 +3363,7 @@ spare3 varchar(65536) YES NULL
desc oceanbase.__all_part_info_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3389,7 +3409,7 @@ original_name varchar(256) NO NULL
desc oceanbase.__all_resource_pool;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
resource_pool_id bigint(20) NO PRI NULL
name varchar(128) NO NULL
unit_count bigint(20) NO NULL
......@@ -3401,7 +3421,7 @@ is_tenant_sys_pool tinyint(4) NO 0
desc oceanbase.__all_restore_job;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
job_id bigint(20) NO PRI NULL
tenant_name varchar(64) NO NULL
start_time bigint(20) NO NULL
......@@ -3413,7 +3433,7 @@ status bigint(20) NO NULL
desc oceanbase.__all_restore_job_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
job_id bigint(20) NO PRI NULL
tenant_name varchar(64) NO NULL
start_time bigint(20) NO NULL
......@@ -3425,7 +3445,7 @@ status bigint(20) NO NULL
desc oceanbase.__all_restore_task;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -3457,7 +3477,7 @@ rs_svr_port bigint(20) YES 0
desc oceanbase.__all_rootservice_job;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
job_id bigint(20) NO PRI NULL
job_type varchar(128) NO NULL
job_status varchar(128) NO NULL
......@@ -3483,7 +3503,7 @@ tablegroup_name varchar(128) YES NULL
desc oceanbase.__all_routine;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
routine_id bigint(20) NO PRI NULL
database_id bigint(20) NO NULL
......@@ -3504,7 +3524,7 @@ route_sql longtext YES NULL
desc oceanbase.__all_routine_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
routine_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3526,7 +3546,7 @@ route_sql longtext YES NULL
desc oceanbase.__all_routine_param;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
routine_id bigint(20) NO PRI NULL
sequence bigint(20) NO PRI NULL
......@@ -3551,7 +3571,7 @@ extended_type_info varbinary(65536) YES
desc oceanbase.__all_routine_param_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
routine_id bigint(20) NO PRI NULL
sequence bigint(20) NO PRI NULL
......@@ -3577,7 +3597,7 @@ extended_type_info varbinary(65536) YES
desc oceanbase.__all_sequence;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
sequence_key bigint(20) NO PRI NULL
column_id bigint(20) NO PRI NULL
......@@ -3588,7 +3608,7 @@ migrated bigint(20) NO 0
desc oceanbase.__all_sequence_object;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
sequence_id bigint(20) NO PRI NULL
schema_version bigint(20) NO NULL
......@@ -3604,7 +3624,7 @@ cycle_flag tinyint(4) NO NULL
desc oceanbase.__all_sequence_object_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
sequence_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3621,7 +3641,7 @@ cycle_flag tinyint(4) YES NULL
desc oceanbase.__all_sequence_v2;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
sequence_key bigint(20) NO PRI NULL
column_id bigint(20) NO PRI NULL
tenant_id bigint(20) NO NULL
......@@ -3631,13 +3651,13 @@ sync_value bigint(20) unsigned NO NULL
desc oceanbase.__all_sequence_value;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
sequence_id bigint(20) NO PRI NULL
next_value decimal(38,0) NO NULL
desc oceanbase.__all_server;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
svr_ip varchar(46) NO PRI NULL
svr_port bigint(20) NO PRI NULL
id bigint(20) NO NULL
......@@ -3675,7 +3695,7 @@ extra_info varchar(512) YES
desc oceanbase.__all_sql_execute_task;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
job_id bigint(20) NO PRI NULL
execution_id bigint(20) NO PRI NULL
sql_job_id bigint(20) NO PRI NULL
......@@ -3689,7 +3709,7 @@ task_info varchar(4096) NO NULL
desc oceanbase.__all_sstable_checksum;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
data_table_id bigint(20) NO PRI NULL
sstable_id bigint(20) NO PRI NULL
......@@ -3705,7 +3725,7 @@ replica_type bigint(20) NO NULL
desc oceanbase.__all_sstable_column_checksum;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
data_table_id bigint(20) NO PRI NULL
index_id bigint(20) NO PRI NULL
......@@ -3722,7 +3742,7 @@ major_version bigint(20) NO NULL
desc oceanbase.__all_sub_part;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
part_id bigint(20) NO PRI NULL
......@@ -3749,7 +3769,7 @@ drop_schema_version bigint(20) NO -1
desc oceanbase.__all_sub_part_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
part_id bigint(20) NO PRI NULL
......@@ -3777,7 +3797,7 @@ drop_schema_version bigint(20) YES -1
desc oceanbase.__all_synonym;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
synonym_id bigint(20) NO PRI NULL
database_id bigint(20) NO NULL
......@@ -3788,7 +3808,7 @@ object_database_id bigint(20) NO NULL
desc oceanbase.__all_synonym_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
synonym_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3800,7 +3820,7 @@ object_database_id bigint(20) YES NULL
desc oceanbase.__all_sys_parameter;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
zone varchar(128) NO PRI NULL
svr_type varchar(16) NO PRI NULL
svr_ip varchar(46) NO PRI NULL
......@@ -3820,7 +3840,7 @@ edit_level varchar(128) YES NULL
desc oceanbase.__all_sys_stat;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
zone varchar(128) NO PRI NULL
name varchar(128) NO PRI NULL
......@@ -3830,7 +3850,7 @@ info varchar(4096) NO NULL
desc oceanbase.__all_sys_variable;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
zone varchar(128) NO PRI NULL
name varchar(128) NO PRI
......@@ -3843,7 +3863,7 @@ max_val varchar(65536) NO
desc oceanbase.__all_sys_variable_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
zone varchar(128) NO PRI NULL
name varchar(128) NO PRI
......@@ -3858,7 +3878,7 @@ max_val varchar(65536) NO
desc oceanbase.__all_tablegroup;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
tablegroup_id bigint(20) NO PRI NULL
tablegroup_name varchar(128) NO NULL
......@@ -3883,7 +3903,7 @@ is_sub_part_template tinyint(4) NO 1
desc oceanbase.__all_tablegroup_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
tablegroup_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3909,7 +3929,7 @@ is_sub_part_template tinyint(4) YES 1
desc oceanbase.__all_table_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -3985,7 +4005,7 @@ auto_part tinyint(4) YES 0
desc oceanbase.__all_table_privilege;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
user_id bigint(20) NO PRI NULL
database_name varchar(128) NO PRI NULL
......@@ -4004,7 +4024,7 @@ priv_show_view bigint(20) NO 0
desc oceanbase.__all_table_privilege_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
user_id bigint(20) NO PRI NULL
database_name varchar(128) NO PRI NULL
......@@ -4025,7 +4045,7 @@ priv_show_view bigint(20) YES 0
desc oceanbase.__all_table_stat;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -4045,7 +4065,7 @@ create_host varchar(128) NO
desc oceanbase.__all_tenant;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
tenant_name varchar(128) NO NULL
replica_num bigint(20) NO NULL
......@@ -4069,14 +4089,14 @@ in_recyclebin bigint(20) NO 0
desc oceanbase.__all_tenant_gc_partition_info;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
desc oceanbase.__all_tenant_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
is_deleted bigint(20) NO NULL
......@@ -4102,7 +4122,7 @@ in_recyclebin bigint(20) YES 0
desc oceanbase.__all_tenant_meta_table;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
partition_id bigint(20) NO PRI NULL
......@@ -4175,7 +4195,7 @@ Version bigint(20) YES NULL
desc oceanbase.__all_unit;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
unit_id bigint(20) NO PRI NULL
resource_pool_id bigint(20) NO NULL
group_id bigint(20) NO NULL
......@@ -4190,7 +4210,7 @@ replica_type bigint(20) NO 0
desc oceanbase.__all_unit_config;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
unit_config_id bigint(20) NO PRI NULL
name varchar(128) NO NULL
max_cpu double NO NULL
......@@ -4223,7 +4243,7 @@ rs_svr_port bigint(20) YES NULL
desc oceanbase.__all_user;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
user_id bigint(20) NO PRI NULL
user_name varchar(128) NO NULL
......@@ -4259,10 +4279,12 @@ priv_alter_tenant bigint(20) NO 0
priv_alter_system bigint(20) NO 0
priv_create_resource_pool bigint(20) NO 0
priv_create_resource_unit bigint(20) NO 0
max_connections bigint(20) NO 0
max_user_connections bigint(20) NO 0
desc oceanbase.__all_user_history;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
tenant_id bigint(20) NO PRI NULL
user_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
......@@ -4300,6 +4322,8 @@ priv_alter_tenant bigint(20) YES 0
priv_alter_system bigint(20) YES 0
priv_create_resource_pool bigint(20) YES 0
priv_create_resource_unit bigint(20) YES 0
max_connections bigint(20) YES 0
max_user_connections bigint(20) YES 0
desc oceanbase.__all_virtual_bad_block_table;
Field Type Null Key Default Extra
svr_ip varchar(46) NO NULL
......@@ -4910,6 +4934,7 @@ weak_read_timestamp bigint(20) NO -1
replica_type bigint(20) NO 0
last_replay_log_id bigint(20) NO 0
schema_version bigint(20) NO 0
last_replay_log_ts bigint(20) NO 0
desc oceanbase.__all_virtual_partition_item;
Field Type Null Key Default Extra
tenant_id bigint(20) NO NULL
......@@ -5309,6 +5334,7 @@ user_host varchar(128) YES NULL
trans_id bigint(20) unsigned NO NULL
thread_id bigint(20) unsigned NO NULL
ssl_cipher varchar(4096) YES NULL
trace_id varchar(64) YES
desc oceanbase.__all_virtual_proxy_server_stat;
Field Type Null Key Default Extra
svr_ip varchar(46) NO NULL
......@@ -5496,6 +5522,7 @@ idc varchar(4096) NO NULL
zone_type varchar(4096) NO NULL
merge_status varchar(4096) NO NULL
zone_status varchar(4096) NO NULL
svr_min_log_timestamp bigint(20) NO NULL
desc oceanbase.__all_virtual_server_memory_info;
Field Type Null Key Default Extra
svr_ip varchar(46) NO PRI NULL
......@@ -6079,7 +6106,7 @@ spare6 varchar(65536) NO NULL
desc oceanbase.__all_zone;
Field Type Null Key Default Extra
gmt_create timestamp(6) YES CURRENT_TIMESTAMP(6)
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP
gmt_modified timestamp(6) YES CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
zone varchar(128) NO PRI NULL
name varchar(128) NO PRI NULL
value bigint(20) NO NULL
......
use information_schema;
select * from schemata limit 0;
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH DEFAULT_ENCRYPTION
select schema_name from schemata;
show create view schemata;
View Create View character_set_client collation_connection
SCHEMATA CREATE VIEW `SCHEMATA` AS SELECT 'def' AS CATALOG_NAME, DATABASE_NAME AS SCHEMA_NAME, 'utf8mb4' AS DEFAULT_CHARACTER_SET_NAME, 'utf8mb4_general_ci' AS DEFAULT_COLLATION_NAME, NULL AS SQL_PATH FROM oceanbase.__all_virtual_database a WHERE a.tenant_id = effective_tenant_id() and in_recyclebin = 0 and database_name != '__recyclebin' utf8mb4 utf8mb4_general_ci
SCHEMATA CREATE VIEW `SCHEMATA` AS SELECT 'def' AS CATALOG_NAME, DATABASE_NAME AS SCHEMA_NAME, 'utf8mb4' AS DEFAULT_CHARACTER_SET_NAME, 'utf8mb4_general_ci' AS DEFAULT_COLLATION_NAME, NULL AS SQL_PATH, 'NO' as DEFAULT_ENCRYPTION FROM oceanbase.__all_virtual_database a WHERE a.tenant_id = effective_tenant_id() and in_recyclebin = 0 and database_name != '__recyclebin' utf8mb4 utf8mb4_general_ci
desc schemata;
Field Type Null Key Default Extra
CATALOG_NAME varchar(3) NO
......@@ -12,3 +12,4 @@ SCHEMA_NAME varchar(128) NO
DEFAULT_CHARACTER_SET_NAME varchar(7) NO
DEFAULT_COLLATION_NAME varchar(18) NO
SQL_PATH null NO
DEFAULT_ENCRYPTION varchar(2) NO
......@@ -47,7 +47,7 @@ def SYS USER_TAB_PRIVS SELECT C.USER_NAME AS GRANTEE, E.DATABASE_NAM
def SYS USER_TAB_PARTITIONS SELECT CAST(DB_TB.TABLE_NAME AS VARCHAR2(128)) TABLE_NAME, CAST(CASE WHEN PART.SUB_PART_NUM <=0 THEN 'NO' ELSE 'YES' END AS VARCHAR(3)) COMPOSITE, CAST(PART.PART_NAME AS VARCHAR(128)) PARTITION_NAME, CAST(PART.SUB_PART_NUM AS NUMBER) SUBPARTITION_COUNT, CAST(CASE WHEN length(PART.HIGH_BOUND_VAL) > 0 THEN PART.HIGH_BOUND_VAL ELSE PART.LIST_VAL END AS VARCHAR2(1024)) HIGH_VALUE, CAST(CASE WHEN length(PART.HIGH_BOUND_VAL) > 0 THEN length(PART.HIGH_BOUND_VAL) ELSE length(PART.LIST_VAL) END AS NUMBER) HIGH_VALUE_LENGTH, CAST(PART.PART_ID + 1 AS NUMBER) PARTITION_POSITION, CAST(TP.TABLESPACE_NAME AS VARCHAR2(30)) TABLESPACE_NAME, CAST(NULL AS NUMBER) PCT_FREE, CAST(NULL AS NUMBER) PCT_USED, CAST(NULL AS NUMBER) INI_TRANS, CAST(NULL AS NUMBER) MAX_TRANS, CAST(NULL AS NUMBER) INITIAL_EXTENT, CAST(NULL AS NUMBER) NEXT_EXTENT, CAST(NULL AS NUMBER) MIN_EXTENT, CAST(NULL AS NUMBER) MAX_EXTENT, CAST(NULL AS NUMBER) MAX_SIZE, CAST(NULL AS NUMBER) PCT_INCREASE, CAST(NULL AS NUMBER) FREELISTS, CAST(NULL AS NUMBER) FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) COMPRESSION, CAST(PART.COMPRESS_FUNC_NAME AS VARCHAR2(12)) COMPRESS_FOR, CAST(NULL AS NUMBER) NUM_ROWS, CAST(NULL AS NUMBER) BLOCKS, CAST(NULL AS NUMBER) EMPTY_BLOCKS, CAST(NULL AS NUMBER) AVG_SPACE, CAST(NULL AS NUMBER) CHAIN_CNT, CAST(NULL AS NUMBER) AVG_ROW_LEN, CAST(NULL AS NUMBER) SAMPLE_SIZE, CAST(NULL AS DATE) LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) GLOBAL_STATS, CAST(NULL AS VARCHAR2(3)) USER_STATS, CAST(NULL AS VARCHAR2(3)) IS_NESTED, CAST(NULL AS VARCHAR2(30)) PARENT_TABLE_PARTITION, CAST(NULL AS VARCHAR2(3)) "INTERVAL", CAST(NULL AS VARCHAR2(4)) SEGMENT_CREATED FROM (SELECT DB.DATABASE_NAME, DB.DATABASE_ID, TB.TABLE_ID, TB.TABLE_NAME FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE TB.DATABASE_ID = DB.DATABASE_ID AND TB.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID()) DB_TB JOIN SYS.ALL_VIRTUAL_PART_REAL_AGENT PART ON DB_TB.TABLE_ID = PART.TABLE_ID AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB_TB.DATABASE_NAME = SYS_CONTEXT('USERENV','CURRENT_USER') LEFT JOIN SYS.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT TP ON TP.TABLESPACE_ID = PART.TABLESPACE_ID AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_TAB_COMMENTS SELECT CAST(B.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(CASE WHEN TABLE_TYPE = 0 OR TABLE_TYPE = 2 OR TABLE_TYPE = 3 OR TABLE_TYPE = 5 OR TABLE_TYPE = 8 OR TABLE_TYPE = 9 THEN 'TABLE' WHEN TABLE_TYPE = 1 OR TABLE_TYPE = 4 OR TABLE_TYPE = 7 THEN 'VIEW' ELSE NULL END AS VARCHAR2(11)) AS TABLE_TYPE, CAST(B."COMMENT" AS VARCHAR(4000)) AS COMMENTS FROM SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() AND A.DATABASE_NAME = SYS_CONTEXT('USERENV','CURRENT_USER') NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_TAB_COLUMNS select TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_TYPE_MOD, DATA_TYPE_OWNER, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE, DENSITY, NUM_NULLS, NUM_BUCKETS, LAST_ANALYZED, SAMPLE_SIZE, CHARACTER_SET_NAME, CHAR_COL_DECL_LENGTH, GLOBAL_STATS, USER_STATS, AVG_COL_LEN, CHAR_LENGTH, CHAR_USED, V80_FMT_IMAGE, DATA_UPGRADED, HISTOGRAM from SYS.USER_TAB_COLS NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_TAB_COLS_V$ SELECT cast(t.table_name as VARCHAR2(128)) as TABLE_NAME, cast(c.column_name as VARCHAR2(128)) as COLUMN_NAME, cast(decode(c.data_type, 0, 'NULL', 1, 'NUMBER', 2, 'NUMBER', 3, 'NUMBER', 4, 'NUMBER', 5, 'NUMBER', 6, 'NUMBER', 7, 'NUMBER', 8, 'NUMBER', 9, 'NUMBER', 10, 'NUMBER', 11, 'BINARY_FLOAT', 12, 'BINARY_DOUBLE', 13, 'NUMBER', 14, 'NUMBER', 15, 'NUMBER', 16, 'NUMBER', 17, 'DATE', 18, 'TIMESTAMP', 19, 'DATE', 20, 'TIME', 21, 'YEAR', 22, 'VARCHAR2', 23, 'CHAR', 24, 'HEX_STRING', 25, 'EXT', 26, 'UNKNOWN', 27, 'TINYTEXT', 28, 'TEXT', 29, 'MEDIUMTEXT', 30, decode(c.collation_type, 63, 'BLOB', 'CLOB'), 31, 'BIT', 32, 'ENUM', 33, 'SET', 34, 'ENUM_INNER', 35, 'SET_INNER', 36, concat('TIMESTAMP(', concat(c.data_scale, ') WITH TIME ZONE')), 37, concat('TIMESTAMP(', concat(c.data_scale, ') WITH LOCAL TIME ZONE')), 38, concat('TIMESTAMP(', concat(c.data_scale, ')')), 39, 'RAW', 40, concat('INTERVAL YEAR(', concat(c.data_scale, ') TO MONTH')), 41, concat('INTERVAL DAY(', concat(trunc(c.data_scale/10), concat(') TO SECOND(', concat(mod(c.data_scale, 10), ')')))), 42, 'FLOAT', 43, 'NVARCHAR2', 44, 'NCHAR', 45, '', 'UNDEFINED') as VARCHAR2(128)) as DATA_TYPE, cast(NULL as VARCHAR2(3)) as DATA_TYPE_MOD, cast(NULL as VARCHAR2(128)) as DATA_TYPE_OWNER, cast(c.data_length as NUMBER) as DATA_LENGTH, cast(CASE WHEN c.data_type in (11,12,17,18,19,22,23,27,28,29,30,36,37,38,43,44) THEN NULL ELSE CASE WHEN c.data_precision < 0 THEN NULL ELSE c.data_precision END END as NUMBER) as DATA_PRECISION, cast(CASE WHEN c.data_type in (11,12,17,19,22,23,27,28,29,30,42,43,44) THEN NULL ELSE CASE WHEN c.data_scale < -84 THEN NULL ELSE c.data_scale END END as NUMBER) as DATA_SCALE, cast(decode(c.nullable, 1, 'Y', 'N') as VARCHAR2(1)) as NULLABLE, cast(decode(BITAND(c.column_flags, 64), 0, c.column_id, NULL) as NUMBER) as COLUMN_ID, cast(LENGTHB(c.cur_default_value_v2) as NUMBER) as DEFAULT_LENGTH, cast(c.cur_default_value_v2 as /* TODO: LONG() */ VARCHAR(128)) as DATA_DEFAULT, cast(NULL as NUMBER) as NUM_DISTINCT, cast(NULL as /* TODO: RAW */ varchar(128)) as LOW_VALUE, cast(NULL as /* TODO: RAW */ varchar(128)) as HIGH_VALUE, cast(NULL as NUMBER) as DENSITY, cast(NULL as NUMBER) as NUM_NULLS, cast(NULL as NUMBER) as NUM_BUCKETS, cast(NULL as DATE) as LAST_ANALYZED, cast(NULL as NUMBER) as SAMPLE_SIZE, cast(NULL as VARCHAR2(44)) as CHARACTER_SET_NAME, cast(NULL as NUMBER) as CHAR_COL_DECL_LENGTH, cast(NULL as VARCHAR2(3)) as GLOBAL_STATS, cast(NULL as VARCHAR2(3)) as USER_STATS, cast(NULL as VARCHAR2(80)) as NOTES, cast(NULL as NUMBER) as AVG_COL_LEN, cast(decode(c.data_type, 22, c.data_length, 23, c.data_length, 0) as NUMBER) as CHAR_LENGTH, cast(decode(c.data_type, 22, decode(c.data_precision, 1, 'C', 'B'), 23, decode(c.data_precision, 1, 'C', 'B'), NULL) as VARCHAR2(1)) as CHAR_USED, cast(NULL as VARCHAR2(3)) as V80_FMT_IMAGE, cast(NULL as VARCHAR2(3)) as DATA_UPGRADED, cast(decode(BITAND(c.column_flags, 64), 0, 'NO', 'YES') as VARCHAR2(3)) as HIDDEN_COLUMN, cast(decode(BITAND(c.column_flags, 1), 1, 'YES', 'NO') as VARCHAR2(3)) as VIRTUAL_COLUMN, cast(NULL as NUMBER) as SEGMENT_COLUMN_ID, cast(NULL as NUMBER) as INTERNAL_COLUMN_ID, cast(NULL as VARCHAR2(15)) as HISTOGRAM, cast(c.column_name as VARCHAR2(4000)) as QUALIFIED_COL_NAME, cast('YES' as VARCHAR2(3)) as USER_GENERATED, cast(NULL as VARCHAR2(3)) as DEFAULT_ON_NULL, cast(NULL as VARCHAR2(3)) as IDENTITY_COLUMN, cast(NULL as VARCHAR2(128)) as EVALUATION_EDITION, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEFORE, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEGINNING, cast(NULL as VARCHAR2(100)) as COLLATION, cast(NULL as NUMBER) as COLLATED_COLUMN_ID FROM sys.ALL_VIRTUAL_TABLE_REAL_AGENT t JOIN sys.ALL_VIRTUAL_COLUMN_REAL_AGENT c ON c.tenant_id = t.tenant_id AND c.table_id = t.table_id AND T.TENANT_ID = EFFECTIVE_TENANT_ID() AND C.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE c.is_hidden = 0 AND t.table_type in (0,2,3,8,9) AND t.database_id = USERENV('SCHEMAID') NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_TAB_COLS_V$ SELECT cast(t.table_name as VARCHAR2(128)) as TABLE_NAME, cast(c.column_name as VARCHAR2(128)) as COLUMN_NAME, cast(decode(c.data_type, 0, 'NULL', 1, 'NUMBER', 2, 'NUMBER', 3, 'NUMBER', 4, 'NUMBER', 5, 'NUMBER', 6, 'NUMBER', 7, 'NUMBER', 8, 'NUMBER', 9, 'NUMBER', 10, 'NUMBER', 11, 'BINARY_FLOAT', 12, 'BINARY_DOUBLE', 13, 'NUMBER', 14, 'NUMBER', 15, 'NUMBER', 16, 'NUMBER', 17, 'DATE', 18, 'TIMESTAMP', 19, 'DATE', 20, 'TIME', 21, 'YEAR', 22, 'VARCHAR2', 23, 'CHAR', 24, 'HEX_STRING', 25, 'EXT', 26, 'UNKNOWN', 27, 'TINYTEXT', 28, 'TEXT', 29, 'MEDIUMTEXT', 30, decode(c.collation_type, 63, 'BLOB', 'CLOB'), 31, 'BIT', 32, 'ENUM', 33, 'SET', 34, 'ENUM_INNER', 35, 'SET_INNER', 36, concat('TIMESTAMP(', concat(c.data_scale, ') WITH TIME ZONE')), 37, concat('TIMESTAMP(', concat(c.data_scale, ') WITH LOCAL TIME ZONE')), 38, concat('TIMESTAMP(', concat(c.data_scale, ')')), 39, 'RAW', 40, concat('INTERVAL YEAR(', concat(c.data_scale, ') TO MONTH')), 41, concat('INTERVAL DAY(', concat(trunc(c.data_scale/10), concat(') TO SECOND(', concat(mod(c.data_scale, 10), ')')))), 42, 'FLOAT', 43, 'NVARCHAR2', 44, 'NCHAR', 45, '', 'UNDEFINED') as VARCHAR2(128)) as DATA_TYPE, cast(NULL as VARCHAR2(3)) as DATA_TYPE_MOD, cast(NULL as VARCHAR2(128)) as DATA_TYPE_OWNER, cast(c.data_length * CASE WHEN c.data_type in (22,23,30,43,44,46) and c.data_precision = 1 THEN decode(c.collation_type, 63, 1, 249, 4, 248, 4, 87, 2, 28, 2, 55, 4, 54, 4, 101, 2, 46, 4, 45, 4, 224, 4, 1) ELSE 1 END as NUMBER) as DATA_LENGTH, cast(CASE WHEN c.data_type in (11,12,17,18,19,22,23,27,28,29,30,36,37,38,43,44) THEN NULL ELSE CASE WHEN c.data_precision < 0 THEN NULL ELSE c.data_precision END END as NUMBER) as DATA_PRECISION, cast(CASE WHEN c.data_type in (11,12,17,19,22,23,27,28,29,30,42,43,44) THEN NULL ELSE CASE WHEN c.data_scale < -84 THEN NULL ELSE c.data_scale END END as NUMBER) as DATA_SCALE, cast(decode(c.nullable, 1, 'Y', 'N') as VARCHAR2(1)) as NULLABLE, cast(decode(BITAND(c.column_flags, 64), 0, c.column_id, NULL) as NUMBER) as COLUMN_ID, cast(LENGTHB(c.cur_default_value_v2) as NUMBER) as DEFAULT_LENGTH, cast(c.cur_default_value_v2 as /* TODO: LONG() */ VARCHAR(128)) as DATA_DEFAULT, cast(NULL as NUMBER) as NUM_DISTINCT, cast(NULL as /* TODO: RAW */ varchar(128)) as LOW_VALUE, cast(NULL as /* TODO: RAW */ varchar(128)) as HIGH_VALUE, cast(NULL as NUMBER) as DENSITY, cast(NULL as NUMBER) as NUM_NULLS, cast(NULL as NUMBER) as NUM_BUCKETS, cast(NULL as DATE) as LAST_ANALYZED, cast(NULL as NUMBER) as SAMPLE_SIZE, cast(decode(c.data_type, 22, 'CHAR_CS', 23, 'CHAR_CS', 30, decode(c.collation_type, 63, 'NULL', 'CHAR_CS'), 43, 'NCHAR_CS', 44, 'NCHAR_CS', '') as VARCHAR2(44)) as CHARACTER_SET_NAME, cast(NULL as NUMBER) as CHAR_COL_DECL_LENGTH, cast(NULL as VARCHAR2(3)) as GLOBAL_STATS, cast(NULL as VARCHAR2(3)) as USER_STATS, cast(NULL as VARCHAR2(80)) as NOTES, cast(NULL as NUMBER) as AVG_COL_LEN, cast(CASE WHEN c.data_type in (22,23,43,44) THEN c.data_length ELSE 0 END as NUMBER) as CHAR_LENGTH, cast(decode(c.data_type, 22, decode(c.data_precision, 1, 'C', 'B'), 23, decode(c.data_precision, 1, 'C', 'B'), 43, decode(c.data_precision, 1, 'C', 'B'), 44, decode(c.data_precision, 1, 'C', 'B'), NULL) as VARCHAR2(1)) as CHAR_USED, cast(NULL as VARCHAR2(3)) as V80_FMT_IMAGE, cast(NULL as VARCHAR2(3)) as DATA_UPGRADED, cast(decode(BITAND(c.column_flags, 64), 0, 'NO', 'YES') as VARCHAR2(3)) as HIDDEN_COLUMN, cast(decode(BITAND(c.column_flags, 1), 1, 'YES', 'NO') as VARCHAR2(3)) as VIRTUAL_COLUMN, cast(NULL as NUMBER) as SEGMENT_COLUMN_ID, cast(NULL as NUMBER) as INTERNAL_COLUMN_ID, cast(NULL as VARCHAR2(15)) as HISTOGRAM, cast(c.column_name as VARCHAR2(4000)) as QUALIFIED_COL_NAME, cast('YES' as VARCHAR2(3)) as USER_GENERATED, cast(NULL as VARCHAR2(3)) as DEFAULT_ON_NULL, cast(NULL as VARCHAR2(3)) as IDENTITY_COLUMN, cast(NULL as VARCHAR2(128)) as EVALUATION_EDITION, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEFORE, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEGINNING, cast(NULL as VARCHAR2(100)) as COLLATION, cast(NULL as NUMBER) as COLLATED_COLUMN_ID FROM sys.ALL_VIRTUAL_TABLE_REAL_AGENT t JOIN sys.ALL_VIRTUAL_COLUMN_REAL_AGENT c ON c.tenant_id = t.tenant_id AND c.table_id = t.table_id AND T.TENANT_ID = EFFECTIVE_TENANT_ID() AND C.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE c.is_hidden = 0 AND t.table_type in (0,2,3,8,9) AND t.database_id = USERENV('SCHEMAID') NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_TAB_COLS select TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_TYPE_MOD, DATA_TYPE_OWNER, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE, DENSITY, NUM_NULLS, NUM_BUCKETS, LAST_ANALYZED, SAMPLE_SIZE, CHARACTER_SET_NAME, CHAR_COL_DECL_LENGTH, GLOBAL_STATS, USER_STATS, AVG_COL_LEN, CHAR_LENGTH, CHAR_USED, V80_FMT_IMAGE, DATA_UPGRADED, HIDDEN_COLUMN, VIRTUAL_COLUMN, SEGMENT_COLUMN_ID, INTERNAL_COLUMN_ID, HISTOGRAM, QUALIFIED_COL_NAME from SYS.user_tab_cols_v$ NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_TABLESPACES SELECT TABLESPACE_NAME, CAST(NULL AS NUMBER) BLOCK_SIZE, CAST(NULL AS NUMBER) INITIAL_EXTENT, CAST(NULL AS NUMBER) NEXT_EXTENT, CAST(NULL AS NUMBER) MIN_EXTENT, CAST(NULL AS NUMBER) MAX_EXTENT, CAST(NULL AS NUMBER) MAX_SIZE, CAST(NULL AS NUMBER) PCT_INCREASE, CAST(NULL AS NUMBER) MIN_EXTLEN, CAST(NULL AS VARCHAR2(9)) STATUS, CAST(NULL AS VARCHAR2(9)) CONTENTS, CAST(NULL AS VARCHAR2(9)) LOGGING, CAST(NULL AS VARCHAR2(3)) FORCE_LOGGING, CAST(NULL AS VARCHAR2(10)) EXTENT_MANAGEMENT, CAST(NULL AS VARCHAR2(9)) ALLOCATION_TYPE, CAST(NULL AS VARCHAR2(6)) SEGMENT_SPACE_MANAGEMENT, CAST(NULL AS VARCHAR2(8)) DEF_TAB_COMPRESSION, CAST(NULL AS VARCHAR2(11)) RETENTION, CAST(NULL AS VARCHAR2(3)) BIGFILE, CAST(NULL AS VARCHAR2(7)) PREDICATE_EVALUATION, CAST(NULL AS VARCHAR2(3)) ENCRYPTED, CAST(NULL AS VARCHAR2(12)) COMPRESS_FOR FROM SYS.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT WHERE TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_TABLES SELECT CAST(t.table_name AS VARCHAR2(128)) AS TABLE_NAME, CAST(tp.tablespace_name AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS VARCHAR2(128)) AS CLUSTER_NAME, CAST(NULL AS VARCHAR2(128)) AS IOT_NAME, CAST('VALID' AS VARCHAR2(8)) AS STATUS, CAST(t."PCTFREE" AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS PCT_USED, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENTS, CAST(NULL AS NUMBER) AS MAX_EXTENTS, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(3)) AS LOGGING, CAST(NULL AS VARCHAR2(1)) AS BACKED_UP, CAST(info.row_count AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS BLOCKS, CAST(NULL AS NUMBER) AS EMPTY_BLOCKS, CAST(NULL AS NUMBER) AS AVG_SPACE, CAST(NULL AS NUMBER) AS CHAIN_CNT, CAST(NULL AS NUMBER) AS AVG_ROW_LEN, CAST(NULL AS NUMBER) AS AVG_SPACE_FREELIST_BLOCKS, CAST(NULL AS NUMBER) AS NUM_FREELIST_BLOCKS, CAST(NULL AS VARCHAR2(40)) AS DEGREE, CAST(NULL AS VARCHAR2(40)) AS INSTANCES, CAST(NULL AS VARCHAR2(20)) AS CACHE, CAST(NULL AS VARCHAR2(8)) AS TABLE_LOCK, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST( CASE WHEN t.part_level = 0 THEN 'NO' ELSE 'YES' END AS VARCHAR2(3)) AS PARTITIONED, CAST(NULL AS VARCHAR2(12)) AS IOT_TYPE, CAST(decode (t.table_type, 8, 'YES', 9, 'YES', 'NO') AS VARCHAR2(1)) AS TEMPORARY, CAST(NULL AS VARCHAR2(1)) AS SECONDARY, CAST('NO' AS VARCHAR2(3)) AS NESTED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(8)) AS ROW_MOVEMENT, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST( decode (t.table_type, 8, 'SYS$SESSION', 9, 'SYS$TRANSACTION', NULL) AS VARCHAR2(15)) AS DURATION, CAST(NULL AS VARCHAR2(8)) AS SKIP_CORRUPT, CAST(NULL AS VARCHAR2(3)) AS MONITORING, CAST(NULL AS VARCHAR2(30)) AS CLUSTER_OWNER, CAST(NULL AS VARCHAR2(8)) AS DEPENDENCIES, CAST(NULL AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS VARCHAR2(12)) AS COMPRESS_FOR, CAST( CASE WHEN db.database_name = '__recyclebin' THEN 'YES' ELSE 'NO' END AS VARCHAR2(3)) AS DROPPED, CAST(NULL AS VARCHAR2(3)) AS READ_ONLY, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED, CAST(NULL AS VARCHAR2(7)) AS RESULT_CACHE FROM ( SELECT tenant_id, table_id, SUM(row_count) AS row_count FROM sys.ALL_VIRTUAL_TENANT_PARTITION_META_TABLE_REAL_AGENT p WHERE p.role = 1 AND P.TENANT_ID = EFFECTIVE_TENANT_ID() GROUP BY tenant_id, table_id ) info RIGHT JOIN sys.ALL_VIRTUAL_TABLE_REAL_AGENT t ON t.tenant_id = info.tenant_id AND t.table_id = info.table_id AND T.TENANT_ID = EFFECTIVE_TENANT_ID() JOIN sys.ALL_VIRTUAL_DATABASE_REAL_AGENT db ON db.tenant_id = t.tenant_id AND db.database_id = t.database_id AND t.database_id = USERENV('SCHEMAID') AND t.table_type in (3, 8, 9, 11) AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN sys.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT tp ON tp.tablespace_id = t.tablespace_id AND t.tenant_id = tp.tenant_id AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE t.session_id = 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
......@@ -72,7 +72,7 @@ def SYS USER_MVIEW_COMMENTS SELECT db.DATABASE_NAME AS OWNER, CAST(t.TABLE_
def SYS USER_METHOD_PARAMS SELECT CAST(NULL AS VARCHAR2(30)) AS TYPE_NAME, CAST(NULL AS VARCHAR2(30)) AS METHOD_NAME, CAST(NULL AS NUMBER) AS METHOD_NO, CAST(NULL AS VARCHAR2(30)) AS PARAM_NAME, CAST(NULL AS NUMBER) AS PARAM_NO, CAST(NULL AS VARCHAR2(6)) AS PARAM_MODE, CAST(NULL AS VARCHAR2(7)) AS PARAM_TYPE_MOD, CAST(NULL AS VARCHAR2(30)) AS PARAM_TYPE_OWNER, CAST(NULL AS VARCHAR2(30)) AS PARAM_TYPE_NAME, CAST(NULL AS VARCHAR2(44)) AS CHARACTER_SET_NAME FROM DUAL WHERE 1 = 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_IND_SUBPARTITIONS SELECT CAST(B.INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(PART.PART_NAME AS VARCHAR2(30)) AS PARTITION_NAME, CAST(SUB_PART.SUB_PART_NAME AS VARCHAR2(128)) AS SUBPARTITION_NAME, CAST(SUB_PART.HIGH_BOUND_VAL AS VARCHAR2(1024)) AS HIGH_VALUE, CAST(LENGTH(SUB_PART.HIGH_BOUND_VAL) AS NUMBER) AS HIGH_VALUE_LENGTH, SUB_PART.SUB_PART_ID + 1 AS SUBPARTITION_POSITION, CAST(NULL AS VARCHAR2(8)) AS STATUS, CAST(NULL AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENT, CAST(NULL AS NUMBER) AS MAX_EXTENT, CAST(NULL AS NUMBER) AS MAX_SIZE, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) AS LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS INTERVAL, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM( SELECT A.INDEX_OWNER AS INDEX_OWNER, A.INDEX_NAME AS INDEX_NAME, A.INDEX_TABLE_ID AS TABLE_ID, /*INDEX TABLE ID */ A.DATA_TABLE_ID AS DATA_TABLE_ID, A.PART_LEVEL AS INDEX_TABLE_PART_LEVEL, TB2.PART_LEVEL AS DATA_TABLE_PART_LEVEL, /* CAST(CASE WHEN A.PART_LEVEL=2 THEN 'FALSE' ELSE 'TRUE' END AS VARCHAR2(5)) IS_LOCAL */ CAST('TRUE' AS VARCHAR2(5)) AS IS_LOCAL FROM( SELECT DB.DATABASE_NAME AS INDEX_OWNER, SUBSTR(TB1.TABLE_NAME, 7 + INSTR(SUBSTR(TB1.TABLE_NAME, 7), '_')) AS INDEX_NAME, TB1.TABLE_ID AS INDEX_TABLE_ID, TB1.DATA_TABLE_ID AS DATA_TABLE_ID, TB1.INDEX_TYPE AS INDEX_TYPE, TB1.PART_LEVEL AS PART_LEVEL /*USE DATA TABLE'S PART_LEVEL IF INDEX IS LOCAL INDEX*/ FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB1, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE DB.DATABASE_NAME!='__recyclebin' AND TB1.DATABASE_ID=DB.DATABASE_ID AND TB1.TABLE_TYPE=5 AND TB1.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() ) A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB2 ON A.DATA_TABLE_ID=TB2.TABLE_ID AND TB2.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE A.PART_LEVEL=2 OR ((A.INDEX_TYPE=1 OR A.INDEX_TYPE=2) AND TB2.PART_LEVEL=2) ) B, SYS.ALL_VIRTUAL_PART_REAL_AGENT PART, SYS.ALL_VIRTUAL_SUB_PART_REAL_AGENT SUB_PART WHERE ((B.IS_LOCAL='FALSE' AND B.TABLE_ID=PART.TABLE_ID AND PART.TABLE_ID=SUB_PART.TABLE_ID AND PART.PART_ID=SUB_PART.PART_ID) OR (B.IS_LOCAL='TRUE' AND B.DATA_TABLE_ID=PART.TABLE_ID AND PART.TABLE_ID=SUB_PART.TABLE_ID AND PART.PART_ID=SUB_PART.PART_ID)) AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() AND SUB_PART.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_IND_PARTITIONS SELECT CAST(B.INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(CASE WHEN PART.SUB_PART_NUM <=0 THEN 'NO' ELSE 'YES' END AS VARCHAR(3)) AS COMPOSITE, CAST(PART.PART_NAME AS VARCHAR2(128)) AS PARTITION_NAME, PART.SUB_PART_NUM AS SUBPARTITION_COUNT, CAST(PART.HIGH_BOUND_VAL AS VARCHAR2(1024)) AS HIGH_VALUE, CAST(LENGTH(PART.HIGH_BOUND_VAL) AS NUMBER) AS HIGH_VALUE_LENGTH, PART.PART_ID + 1 AS PARTITION_POSITION, CAST(NULL AS VARCHAR2(8)) AS STATUS, CAST(NULL AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENT, CAST(NULL AS NUMBER) AS MAX_EXTENT, CAST(NULL AS NUMBER) AS MAX_SIZE, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) AS LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS INTERVAL, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM( SELECT A.INDEX_OWNER AS INDEX_OWNER, A.INDEX_NAME AS INDEX_NAME, A.INDEX_TABLE_ID AS TABLE_ID, /*INDEX TABLE ID */ A.DATA_TABLE_ID AS DATA_TABLE_ID, CAST(CASE WHEN A.PART_LEVEL=1 THEN 'FALSE' ELSE 'TRUE' END AS VARCHAR2(5)) IS_LOCAL FROM( SELECT DB.DATABASE_NAME AS INDEX_OWNER, SUBSTR(TB1.TABLE_NAME, 7 + INSTR(SUBSTR(TB1.TABLE_NAME, 7), '_')) AS INDEX_NAME, TB1.TABLE_ID AS INDEX_TABLE_ID, TB1.DATA_TABLE_ID AS DATA_TABLE_ID, TB1.INDEX_TYPE AS INDEX_TYPE, TB1.PART_LEVEL AS PART_LEVEL /*USE DATA TABLE'S PART_LEVEL IF INDEX IS LOCAL INDEX*/ FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB1, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE DB.DATABASE_NAME!='__recyclebin' AND TB1.DATABASE_ID=DB.DATABASE_ID AND TB1.TABLE_TYPE=5 AND TB1.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() ) A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB2 ON A.DATA_TABLE_ID=TB2.TABLE_ID AND TB2.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE A.PART_LEVEL=1 OR ((A.INDEX_TYPE=1 OR A.INDEX_TYPE=2) AND TB2.PART_LEVEL=1) ) B JOIN SYS.ALL_VIRTUAL_PART_REAL_AGENT PART ON ((B.TABLE_ID=PART.TABLE_ID AND B.IS_LOCAL='FALSE') OR (B.DATA_TABLE_ID=PART.TABLE_ID AND B.IS_LOCAL='TRUE')) AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_IND_EXPRESSIONS SELECT CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(H.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_EXPRESSION /* TODO: LONG */ AS VARCHAR2(1000)) AS COLUMN_EXPRESSION, COLUMN_POSITION FROM ( SELECT INDEX_NAME, F.CUR_DEFAULT_VALUE_V2 AS COLUMN_EXPRESSION, E.INDEX_POSITION AS COLUMN_POSITION, E.TABLE_ID AS TABLE_ID FROM (SELECT INDEX_NAME, C.TABLE_ID AS TABLE_ID, C.INDEX_ID AS INDEX_ID, D.COLUMN_ID AS COLUMN_ID, D.COLUMN_NAME AS COLUMN_NAME, D.INDEX_POSITION AS INDEX_POSITION FROM (SELECT SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) AS INDEX_NAME, A.DATA_TABLE_ID AS TABLE_ID, A.TABLE_ID AS INDEX_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND B.DATABASE_NAME != '__recyclebin' AND A.DATABASE_ID = USERENV('SCHEMAID') AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE TABLE_TYPE=5 ) C JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT D ON C.INDEX_ID=D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID()) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON F.TABLE_ID=E.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() AND F.COLUMN_ID=E.COLUMN_ID AND F.COLUMN_FLAGS=1) G JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT H ON G.TABLE_ID=H.TABLE_ID AND H.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_IND_EXPRESSIONS SELECT CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(H.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_EXPRESSION /* TODO: LONG */ AS VARCHAR2(1000)) AS COLUMN_EXPRESSION, COLUMN_POSITION FROM ( SELECT INDEX_NAME, F.CUR_DEFAULT_VALUE_V2 AS COLUMN_EXPRESSION, E.INDEX_POSITION AS COLUMN_POSITION, E.TABLE_ID AS TABLE_ID FROM (SELECT INDEX_NAME, C.TABLE_ID AS TABLE_ID, C.INDEX_ID AS INDEX_ID, D.COLUMN_ID AS COLUMN_ID, D.COLUMN_NAME AS COLUMN_NAME, D.INDEX_POSITION AS INDEX_POSITION FROM (SELECT SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) AS INDEX_NAME, A.DATA_TABLE_ID AS TABLE_ID, A.TABLE_ID AS INDEX_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND B.DATABASE_NAME != '__recyclebin' AND A.DATABASE_ID = USERENV('SCHEMAID') AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE TABLE_TYPE=5 ) C JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT D ON C.INDEX_ID=D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() AND D.INDEX_POSITION != 0) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON F.TABLE_ID=E.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() AND F.COLUMN_ID=E.COLUMN_ID AND BITAND(F.COLUMN_FLAGS,3) > 0) G JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT H ON G.TABLE_ID=H.TABLE_ID AND H.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_IND_COLUMNS SELECT CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_NAME AS VARCHAR2(4000)) AS COLUMN_NAME, CAST(ROWKEY_POSITION AS NUMBER) AS COLUMN_POSITION, CASE WHEN DATA_TYPE >= 1 AND DATA_TYPE <= 16 THEN CAST(22 AS NUMBER) WHEN DATA_TYPE = 17 THEN CAST(7 AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 2 THEN CAST(DATA_LENGTH AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 1 AND F.COLLATION_TYPE IN (45, 46, 224, 54, 55, 101) THEN CAST(DATA_LENGTH * 4 AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 1 AND F.COLLATION_TYPE IN (28, 87) THEN CAST(DATA_LENGTH * 2 AS NUMBER) WHEN DATA_TYPE = 36 THEN CAST(12 AS NUMBER) WHEN DATA_TYPE IN (37, 38) THEN CAST(11 AS NUMBER) WHEN DATA_TYPE = 39 THEN CAST(DATA_LENGTH AS NUMBER) WHEN DATA_TYPE = 40 THEN CAST(5 AS NUMBER) WHEN DATA_TYPE = 41 THEN CAST(11 AS NUMBER) ELSE CAST(0 AS NUMBER) END AS COLUMN_LENGTH, CASE WHEN DATA_TYPE IN (22, 23) THEN CAST(DATA_LENGTH AS NUMBER) ELSE CAST(0 AS NUMBER) END AS CHAR_LENGTH, CAST('ASC' AS VARCHAR2(4)) AS DESCEND FROM (SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, TABLE_NAME, INDEX_ID, IDX_TYPE FROM (SELECT DATABASE_NAME AS INDEX_OWNER, CASE WHEN (TABLE_TYPE = 5) THEN SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) ELSE (CONS_TAB.CONSTRAINT_NAME) END AS INDEX_NAME, DATABASE_NAME AS TABLE_OWNER, CASE WHEN (TABLE_TYPE = 3) THEN A.TABLE_ID ELSE A.DATA_TABLE_ID END AS TABLE_ID, A.TABLE_ID AS INDEX_ID, TABLE_TYPE AS IDX_TYPE FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND TABLE_TYPE IN (5, 3) AND A.DATABASE_ID = USERENV('SCHEMAID') AND B.DATABASE_NAME != '__recyclebin' AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_CONSTRAINT_REAL_AGENT CONS_TAB ON (CONS_TAB.TABLE_ID = A.TABLE_ID AND CONS_TAB.TENANT_ID = EFFECTIVE_TENANT_ID()) WHERE NOT( TABLE_TYPE = 3 AND CONSTRAINT_NAME IS NULL ) ) C JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT D ON C.TABLE_ID = D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() ) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON E.INDEX_ID = F.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE F.ROWKEY_POSITION != 0 AND (CASE WHEN IDX_TYPE = 5 THEN INDEX_POSITION ELSE 1 END) != 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_INDEXES SELECT CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(INDEX_TYPE_NAME AS VARCHAR2(27)) AS INDEX_TYPE, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST('TABLE' AS CHAR(5)) AS TABLE_TYPE, CAST(UNIQUENESS AS VARCHAR2(9)) AS UNIQUENESS, CAST(COMPRESSION AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS PREFIX_LENGTH, CAST(TP.TABLESPACE_NAME AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENTS, CAST(NULL AS NUMBER) AS MAX_EXTENTS, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS PCT_THRESHOLD, CAST(NULL AS NUMBER) AS INCLUDE_COLUMN, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS VARCHAR2(3)) AS LOGGING, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(STATUS AS VARCHAR2(10)) AS STATUS, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(40)) AS DEGREE, CAST(NULL AS VARCHAR2(40)) AS INSTANCES, CAST(CASE WHEN A_TABLE_TYPE = 3 THEN 'NO' WHEN A_INDEX_TYPE = 1 OR A_INDEX_TYPE = 2 THEN (CASE WHEN D.PART_LEVEL = 0 THEN 'NO' ELSE 'YES' END) ELSE (CASE WHEN A_PART_LEVEL = 0 THEN 'NO' ELSE 'YES' END) END AS VARCHAR2(3)) AS PARTITIONED, CAST(NULL AS VARCHAR2(1)) AS TEMPORARY, CAST(NULL AS VARCHAR2(1)) AS "GENERATED", CAST(NULL AS VARCHAR2(1)) AS SECONDARY, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS VARCHAR2(15)) AS DURATION, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(30)) AS ITYP_OWNER, CAST(NULL AS VARCHAR2(30)) AS ITYP_NAME, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(12)) AS DOMIDX_STATUS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(FUNCIDX_STATUS AS VARCHAR2(8)) AS FUNCIDX_STATUS, CAST('NO' AS VARCHAR2(3)) AS JOIN_INDEX, CAST(NULL AS VARCHAR2(3)) AS IOT_REDUNDANT_PKEY_ELIM, CAST(DROPPED AS VARCHAR2(9)) AS DROPPED, CAST(VISIBILITY AS VARCHAR2(10)) AS VISIBILITY, CAST(NULL AS VARCHAR2(14)) AS DOMIDX_MANAGEMENT, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM (SELECT DATABASE_NAME AS INDEX_OWNER, CASE WHEN (TABLE_TYPE = 5 AND B.DATABASE_NAME != '__recyclebin') THEN SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) WHEN (TABLE_TYPE = 5 AND B.DATABASE_NAME = '__recyclebin') THEN TABLE_NAME ELSE (CONS_TAB.CONSTRAINT_NAME) END AS INDEX_NAME, CASE WHEN A.TABLE_TYPE = 5 AND EXISTS ( SELECT 1 FROM SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT T_COL_INDEX, SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT T_COL_BASE WHERE T_COL_BASE.TABLE_ID = A.DATA_TABLE_ID AND T_COL_BASE.COLUMN_NAME = T_COL_INDEX.COLUMN_NAME AND T_COL_INDEX.TABLE_ID = A.TABLE_ID AND T_COL_BASE.TENANT_ID = A.TENANT_ID AND T_COL_INDEX.TENANT_ID = A.TENANT_ID AND BITAND(T_COL_BASE.COLUMN_FLAGS,3) > 0 ) THEN 'FUNCTION-BASED NORMAL' ELSE 'NORMAL' END AS INDEX_TYPE_NAME, DATABASE_NAME AS TABLE_OWNER, CASE WHEN (TABLE_TYPE = 3) THEN A.TABLE_ID ELSE A.DATA_TABLE_ID END AS TABLE_ID, A.TABLE_ID AS INDEX_ID, CASE WHEN TABLE_TYPE = 3 THEN 'UNIQUE' WHEN A.INDEX_TYPE IN (2, 4, 8) THEN 'UNIQUE' ELSE 'NONUNIQUE' END AS UNIQUENESS, CASE WHEN A.COMPRESS_FUNC_NAME = NULL THEN 'DISABLED' ELSE 'ENABLED' END AS COMPRESSION, CASE WHEN TABLE_TYPE = 3 THEN 'VALID' WHEN A.INDEX_STATUS = 2 THEN 'VALID' WHEN A.INDEX_STATUS = 3 THEN 'CHECKING' WHEN A.INDEX_STATUS = 4 THEN 'INELEGIBLE' WHEN A.INDEX_STATUS = 5 THEN 'ERROR' ELSE 'UNUSABLE' END AS STATUS, A.INDEX_TYPE AS A_INDEX_TYPE, A.PART_LEVEL AS A_PART_LEVEL, A.TABLE_TYPE AS A_TABLE_TYPE, CASE WHEN 0 = (SELECT COUNT(1) FROM SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT WHERE TABLE_ID = A.TABLE_ID AND IS_HIDDEN = 0 AND TENANT_ID = EFFECTIVE_TENANT_ID()) THEN 'ENABLED' ELSE 'NULL' END AS FUNCIDX_STATUS, CASE WHEN B.DATABASE_NAME = '__recyclebin' THEN 'YES' ELSE 'NO' END AS DROPPED, CASE WHEN BITAND(A.INDEX_ATTRIBUTES_SET, 1) = 0 THEN 'VISIBLE' ELSE 'INVISIBLE' END AS VISIBILITY, A.TABLESPACE_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = USERENV('SCHEMAID') AND A.DATABASE_ID = B.DATABASE_ID AND TABLE_TYPE IN (5, 3) AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_CONSTRAINT_REAL_AGENT CONS_TAB ON (CONS_TAB.TABLE_ID = A.TABLE_ID) AND CONS_TAB.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE NOT(TABLE_TYPE = 3 AND CONSTRAINT_NAME IS NULL) AND (CONS_TAB.CONSTRAINT_TYPE IS NULL OR CONS_TAB.CONSTRAINT_TYPE = 1) ) C JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT D ON C.TABLE_ID = D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT TP ON C.TABLESPACE_ID = TP.TABLESPACE_ID AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS USER_ERRORS SELECT CAST(o.owner AS VARCHAR2(128)) AS OWNER, CAST(o.object_name AS VARCHAR2(128)) AS NAME, CAST(o.object_type AS VARCHAR2(19)) AS TYPE, CAST(e.obj_seq AS NUMBER) AS SEQUENCE, CAST(e.line AS NUMBER) AS LINE, CAST(e.position AS NUMBER) AS POSITION, CAST(e.text as VARCHAR2(4000)) AS TEXT, CAST(DECODE(e.property, 0, 'ERROR', 1, 'WARNING', 'UNDEFINED') AS VARCHAR2(9)) AS ATTRIBUTE, CAST(e.error_number AS NUMBER) AS MESSAGE_NUMBER FROM all_objects o, (select obj_id, obj_seq, line, position, text, property, error_number, CAST( UPPER(decode(obj_type, 3, 'PACKAGE', 4, 'TYPE', 5, 'PACKAGE BODY', 6, 'TYPE BODY', 7, 'TRIGGER', 8, 'VIEW', 9, 'FUNCTION', 12, 'PROCEDURE', 'MAXTYPE')) AS VARCHAR2(23)) object_type from sys.ALL_VIRTUAL_TENANT_ERROR_REAL_AGENT WHERE TENANT_ID = EFFECTIVE_TENANT_ID()) e, all_users u WHERE o.object_id = e.obj_id AND o.object_type like e.object_type AND o.object_type IN (UPPER('package'), UPPER('type'), UPPER('procedure'), UPPER('function'), UPPER('package body'), UPPER('view'), UPPER('trigger'), UPPER('type body'), UPPER('library'), UPPER('queue'), UPPER('java source'), UPPER('java class'), UPPER('dimension'), UPPER('assembly'), UPPER('hierarchy'), UPPER('arrtibute dimension'), UPPER('analytic view')) AND u.username=o.owner AND u.userid IN (USERENV('SCHEMAID')) NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
......@@ -138,7 +138,7 @@ def SYS DBA_TAB_PRIVS SELECT C.USER_NAME AS GRANTEE, E.DATABASE_NAME
def SYS DBA_TAB_PARTITIONS SELECT CAST(DB_TB.DATABASE_NAME AS VARCHAR2(128)) TABLE_OWNER, CAST(DB_TB.TABLE_NAME AS VARCHAR2(128)) TABLE_NAME, CAST(CASE WHEN PART.SUB_PART_NUM <=0 THEN 'NO' ELSE 'YES' END AS VARCHAR(3)) COMPOSITE, CAST(PART.PART_NAME AS VARCHAR(128)) PARTITION_NAME, CAST(PART.SUB_PART_NUM AS NUMBER) SUBPARTITION_COUNT, CAST(CASE WHEN length(PART.HIGH_BOUND_VAL) > 0 THEN PART.HIGH_BOUND_VAL ELSE PART.LIST_VAL END AS VARCHAR2(1024)) HIGH_VALUE, CAST(CASE WHEN length(PART.HIGH_BOUND_VAL) > 0 THEN length(PART.HIGH_BOUND_VAL) ELSE length(PART.LIST_VAL) END AS NUMBER) HIGH_VALUE_LENGTH, CAST(PART.PART_ID + 1 AS NUMBER) PARTITION_POSITION, CAST(TP.TABLESPACE_NAME AS VARCHAR2(30)) TABLESPACE_NAME, CAST(NULL AS NUMBER) PCT_FREE, CAST(NULL AS NUMBER) PCT_USED, CAST(NULL AS NUMBER) INI_TRANS, CAST(NULL AS NUMBER) MAX_TRANS, CAST(NULL AS NUMBER) INITIAL_EXTENT, CAST(NULL AS NUMBER) NEXT_EXTENT, CAST(NULL AS NUMBER) MIN_EXTENT, CAST(NULL AS NUMBER) MAX_EXTENT, CAST(NULL AS NUMBER) MAX_SIZE, CAST(NULL AS NUMBER) PCT_INCREASE, CAST(NULL AS NUMBER) FREELISTS, CAST(NULL AS NUMBER) FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) COMPRESSION, CAST(PART.COMPRESS_FUNC_NAME AS VARCHAR2(12)) COMPRESS_FOR, CAST(NULL AS NUMBER) NUM_ROWS, CAST(NULL AS NUMBER) BLOCKS, CAST(NULL AS NUMBER) EMPTY_BLOCKS, CAST(NULL AS NUMBER) AVG_SPACE, CAST(NULL AS NUMBER) CHAIN_CNT, CAST(NULL AS NUMBER) AVG_ROW_LEN, CAST(NULL AS NUMBER) SAMPLE_SIZE, CAST(NULL AS DATE) LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) GLOBAL_STATS, CAST(NULL AS VARCHAR2(3)) USER_STATS, CAST(NULL AS VARCHAR2(3)) IS_NESTED, CAST(NULL AS VARCHAR2(30)) PARENT_TABLE_PARTITION, CAST(NULL AS VARCHAR2(3)) "INTERVAL", CAST(NULL AS VARCHAR2(4)) SEGMENT_CREATED FROM (SELECT DB.DATABASE_NAME, DB.DATABASE_ID, TB.TABLE_ID, TB.TABLE_NAME FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE TB.DATABASE_ID = DB.DATABASE_ID AND TB.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID()) DB_TB JOIN SYS.ALL_VIRTUAL_PART_REAL_AGENT PART ON DB_TB.TABLE_ID = PART.TABLE_ID AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT TP ON TP.TABLESPACE_ID = PART.TABLESPACE_ID AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_TAB_COMMENTS SELECT A.DATABASE_NAME AS OWNER, CAST(B.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(CASE WHEN TABLE_TYPE = 0 OR TABLE_TYPE = 2 OR TABLE_TYPE = 3 OR TABLE_TYPE = 5 OR TABLE_TYPE = 8 OR TABLE_TYPE = 9 THEN 'TABLE' WHEN TABLE_TYPE = 1 OR TABLE_TYPE = 4 OR TABLE_TYPE = 7 THEN 'VIEW' ELSE NULL END AS VARCHAR2(11)) AS TABLE_TYPE, CAST(B."COMMENT" AS VARCHAR(4000)) AS COMMENTS FROM SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_TAB_COLUMNS select OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_TYPE_MOD, DATA_TYPE_OWNER, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE, DENSITY, NUM_NULLS, NUM_BUCKETS, LAST_ANALYZED, SAMPLE_SIZE, CHARACTER_SET_NAME, CHAR_COL_DECL_LENGTH, GLOBAL_STATS, USER_STATS, AVG_COL_LEN, CHAR_LENGTH, CHAR_USED, V80_FMT_IMAGE, DATA_UPGRADED, HISTOGRAM from SYS.DBA_TAB_COLS NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_TAB_COLS_V$ SELECT cast(db.database_name as VARCHAR2(128)) as OWNER, cast(t.table_name as VARCHAR2(128)) as TABLE_NAME, cast(c.column_name as VARCHAR2(128)) as COLUMN_NAME, cast(decode(c.data_type, 0, 'NULL', 1, 'NUMBER', 2, 'NUMBER', 3, 'NUMBER', 4, 'NUMBER', 5, 'NUMBER', 6, 'NUMBER', 7, 'NUMBER', 8, 'NUMBER', 9, 'NUMBER', 10, 'NUMBER', 11, 'BINARY_FLOAT', 12, 'BINARY_DOUBLE', 13, 'NUMBER', 14, 'NUMBER', 15, 'NUMBER', 16, 'NUMBER', 17, 'DATE', 18, 'TIMESTAMP', 19, 'DATE', 20, 'TIME', 21, 'YEAR', 22, 'VARCHAR2', 23, 'CHAR', 24, 'HEX_STRING', 25, 'EXT', 26, 'UNKNOWN', 27, 'TINYTEXT', 28, 'TEXT', 29, 'MEDIUMTEXT', 30, decode(c.collation_type, 63, 'BLOB', 'CLOB'), 31, 'BIT', 32, 'ENUM', 33, 'SET', 34, 'ENUM_INNER', 35, 'SET_INNER', 36, concat('TIMESTAMP(', concat(c.data_scale, ') WITH TIME ZONE')), 37, concat('TIMESTAMP(', concat(c.data_scale, ') WITH LOCAL TIME ZONE')), 38, concat('TIMESTAMP(', concat(c.data_scale, ')')), 39, 'RAW', 40, concat('INTERVAL YEAR(', concat(c.data_scale, ') TO MONTH')), 41, concat('INTERVAL DAY(', concat(trunc(c.data_scale/10), concat(') TO SECOND(', concat(mod(c.data_scale, 10), ')')))), 42, 'FLOAT', 43, 'NVARCHAR2', 44, 'NCHAR', 45, '', 'UNDEFINED') as VARCHAR2(128)) as DATA_TYPE, cast(NULL as VARCHAR2(3)) as DATA_TYPE_MOD, cast(NULL as VARCHAR2(128)) as DATA_TYPE_OWNER, cast(c.data_length as NUMBER) as DATA_LENGTH, cast(CASE WHEN c.data_type in (11,12,17,18,19,22,23,27,28,29,30,36,37,38,43,44) THEN NULL ELSE CASE WHEN c.data_precision < 0 THEN NULL ELSE c.data_precision END END as NUMBER) as DATA_PRECISION, cast(CASE WHEN c.data_type in (11,12,17,19,22,23,27,28,29,30,42,43,44) THEN NULL ELSE CASE WHEN c.data_scale < -84 THEN NULL ELSE c.data_scale END END as NUMBER) as DATA_SCALE, cast(decode(c.nullable, 1, 'Y', 'N') as VARCHAR2(1)) as NULLABLE, cast(decode(BITAND(c.column_flags, 64), 0, c.column_id, NULL) as NUMBER) as COLUMN_ID, cast(LENGTHB(c.cur_default_value_v2) as NUMBER) as DEFAULT_LENGTH, cast(c.cur_default_value_v2 as /* TODO: LONG() */ VARCHAR(128)) as DATA_DEFAULT, cast(NULL as NUMBER) as NUM_DISTINCT, cast(NULL as /* TODO: RAW */ varchar(128)) as LOW_VALUE, cast(NULL as /* TODO: RAW */ varchar(128)) as HIGH_VALUE, cast(NULL as NUMBER) as DENSITY, cast(NULL as NUMBER) as NUM_NULLS, cast(NULL as NUMBER) as NUM_BUCKETS, cast(NULL as DATE) as LAST_ANALYZED, cast(NULL as NUMBER) as SAMPLE_SIZE, cast(NULL as VARCHAR2(44)) as CHARACTER_SET_NAME, cast(NULL as NUMBER) as CHAR_COL_DECL_LENGTH, cast(NULL as VARCHAR2(3)) as GLOBAL_STATS, cast(NULL as VARCHAR2(3)) as USER_STATS, cast(NULL as VARCHAR2(80)) as NOTES, cast(NULL as NUMBER) as AVG_COL_LEN, cast(decode(c.data_type, 22, c.data_length, 23, c.data_length, 0) as NUMBER) as CHAR_LENGTH, cast(decode(c.data_type, 22, decode(c.data_precision, 1, 'C', 'B'), 23, decode(c.data_precision, 1, 'C', 'B'), NULL) as VARCHAR2(1)) as CHAR_USED, cast(NULL as VARCHAR2(3)) as V80_FMT_IMAGE, cast(NULL as VARCHAR2(3)) as DATA_UPGRADED, cast(decode(BITAND(c.column_flags, 64), 0, 'NO', 'YES') as VARCHAR2(3)) as HIDDEN_COLUMN, cast(decode(BITAND(c.column_flags, 1), 1, 'YES', 'NO') as VARCHAR2(3)) as VIRTUAL_COLUMN, cast(NULL as NUMBER) as SEGMENT_COLUMN_ID, cast(NULL as NUMBER) as INTERNAL_COLUMN_ID, cast(NULL as VARCHAR2(15)) as HISTOGRAM, cast(c.column_name as VARCHAR2(4000)) as QUALIFIED_COL_NAME, cast('YES' as VARCHAR2(3)) as USER_GENERATED, cast(NULL as VARCHAR2(3)) as DEFAULT_ON_NULL, cast(NULL as VARCHAR2(3)) as IDENTITY_COLUMN, cast(NULL as VARCHAR2(128)) as EVALUATION_EDITION, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEFORE, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEGINNING, cast(NULL as VARCHAR2(100)) as COLLATION, cast(NULL as NUMBER) as COLLATED_COLUMN_ID FROM sys.ALL_VIRTUAL_TABLE_REAL_AGENT t JOIN sys.ALL_VIRTUAL_DATABASE_REAL_AGENT db ON db.tenant_id = t.tenant_id AND db.database_id = t.database_id AND T.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() JOIN sys.ALL_VIRTUAL_COLUMN_REAL_AGENT c ON c.tenant_id = t.tenant_id AND c.table_id = t.table_id AND C.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE c.is_hidden = 0 AND t.table_type in (0,2,3,8,9) NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_TAB_COLS_V$ SELECT cast(db.database_name as VARCHAR2(128)) as OWNER, cast(t.table_name as VARCHAR2(128)) as TABLE_NAME, cast(c.column_name as VARCHAR2(128)) as COLUMN_NAME, cast(decode(c.data_type, 0, 'NULL', 1, 'NUMBER', 2, 'NUMBER', 3, 'NUMBER', 4, 'NUMBER', 5, 'NUMBER', 6, 'NUMBER', 7, 'NUMBER', 8, 'NUMBER', 9, 'NUMBER', 10, 'NUMBER', 11, 'BINARY_FLOAT', 12, 'BINARY_DOUBLE', 13, 'NUMBER', 14, 'NUMBER', 15, 'NUMBER', 16, 'NUMBER', 17, 'DATE', 18, 'TIMESTAMP', 19, 'DATE', 20, 'TIME', 21, 'YEAR', 22, 'VARCHAR2', 23, 'CHAR', 24, 'HEX_STRING', 25, 'EXT', 26, 'UNKNOWN', 27, 'TINYTEXT', 28, 'TEXT', 29, 'MEDIUMTEXT', 30, decode(c.collation_type, 63, 'BLOB', 'CLOB'), 31, 'BIT', 32, 'ENUM', 33, 'SET', 34, 'ENUM_INNER', 35, 'SET_INNER', 36, concat('TIMESTAMP(', concat(c.data_scale, ') WITH TIME ZONE')), 37, concat('TIMESTAMP(', concat(c.data_scale, ') WITH LOCAL TIME ZONE')), 38, concat('TIMESTAMP(', concat(c.data_scale, ')')), 39, 'RAW', 40, concat('INTERVAL YEAR(', concat(c.data_scale, ') TO MONTH')), 41, concat('INTERVAL DAY(', concat(trunc(c.data_scale/10), concat(') TO SECOND(', concat(mod(c.data_scale, 10), ')')))), 42, 'FLOAT', 43, 'NVARCHAR2', 44, 'NCHAR', 45, '', 'UNDEFINED') as VARCHAR2(128)) as DATA_TYPE, cast(NULL as VARCHAR2(3)) as DATA_TYPE_MOD, cast(NULL as VARCHAR2(128)) as DATA_TYPE_OWNER, cast(c.data_length * CASE WHEN c.data_type in (22,23,30,43,44,46) and c.data_precision = 1 THEN decode(c.collation_type, 63, 1, 249, 4, 248, 4, 87, 2, 28, 2, 55, 4, 54, 4, 101, 2, 46, 4, 45, 4, 224, 4, 1) ELSE 1 END as NUMBER) as DATA_LENGTH, cast(CASE WHEN c.data_type in (11,12,17,18,19,22,23,27,28,29,30,36,37,38,43,44) THEN NULL ELSE CASE WHEN c.data_precision < 0 THEN NULL ELSE c.data_precision END END as NUMBER) as DATA_PRECISION, cast(CASE WHEN c.data_type in (11,12,17,19,22,23,27,28,29,30,42,43,44) THEN NULL ELSE CASE WHEN c.data_scale < -84 THEN NULL ELSE c.data_scale END END as NUMBER) as DATA_SCALE, cast(decode(c.nullable, 1, 'Y', 'N') as VARCHAR2(1)) as NULLABLE, cast(decode(BITAND(c.column_flags, 64), 0, c.column_id, NULL) as NUMBER) as COLUMN_ID, cast(LENGTHB(c.cur_default_value_v2) as NUMBER) as DEFAULT_LENGTH, cast(c.cur_default_value_v2 as /* TODO: LONG() */ VARCHAR(128)) as DATA_DEFAULT, cast(NULL as NUMBER) as NUM_DISTINCT, cast(NULL as /* TODO: RAW */ varchar(128)) as LOW_VALUE, cast(NULL as /* TODO: RAW */ varchar(128)) as HIGH_VALUE, cast(NULL as NUMBER) as DENSITY, cast(NULL as NUMBER) as NUM_NULLS, cast(NULL as NUMBER) as NUM_BUCKETS, cast(NULL as DATE) as LAST_ANALYZED, cast(NULL as NUMBER) as SAMPLE_SIZE, cast(decode(c.data_type, 22, 'CHAR_CS', 23, 'CHAR_CS', 30, decode(c.collation_type, 63, 'NULL', 'CHAR_CS'), 43, 'NCHAR_CS', 44, 'NCHAR_CS', '') as VARCHAR2(44)) as CHARACTER_SET_NAME, cast(NULL as NUMBER) as CHAR_COL_DECL_LENGTH, cast(NULL as VARCHAR2(3)) as GLOBAL_STATS, cast(NULL as VARCHAR2(3)) as USER_STATS, cast(NULL as VARCHAR2(80)) as NOTES, cast(NULL as NUMBER) as AVG_COL_LEN, cast(CASE WHEN c.data_type in (22,23,43,44) THEN c.data_length ELSE 0 END as NUMBER) as CHAR_LENGTH, cast(decode(c.data_type, 22, decode(c.data_precision, 1, 'C', 'B'), 23, decode(c.data_precision, 1, 'C', 'B'), 43, decode(c.data_precision, 1, 'C', 'B'), 44, decode(c.data_precision, 1, 'C', 'B'), NULL) as VARCHAR2(1)) as CHAR_USED, cast(NULL as VARCHAR2(3)) as V80_FMT_IMAGE, cast(NULL as VARCHAR2(3)) as DATA_UPGRADED, cast(decode(BITAND(c.column_flags, 64), 0, 'NO', 'YES') as VARCHAR2(3)) as HIDDEN_COLUMN, cast(decode(BITAND(c.column_flags, 1), 1, 'YES', 'NO') as VARCHAR2(3)) as VIRTUAL_COLUMN, cast(NULL as NUMBER) as SEGMENT_COLUMN_ID, cast(NULL as NUMBER) as INTERNAL_COLUMN_ID, cast(NULL as VARCHAR2(15)) as HISTOGRAM, cast(c.column_name as VARCHAR2(4000)) as QUALIFIED_COL_NAME, cast('YES' as VARCHAR2(3)) as USER_GENERATED, cast(NULL as VARCHAR2(3)) as DEFAULT_ON_NULL, cast(NULL as VARCHAR2(3)) as IDENTITY_COLUMN, cast(NULL as VARCHAR2(128)) as EVALUATION_EDITION, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEFORE, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEGINNING, cast(NULL as VARCHAR2(100)) as COLLATION, cast(NULL as NUMBER) as COLLATED_COLUMN_ID FROM sys.ALL_VIRTUAL_TABLE_REAL_AGENT t JOIN sys.ALL_VIRTUAL_DATABASE_REAL_AGENT db ON db.tenant_id = t.tenant_id AND db.database_id = t.database_id AND T.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() JOIN sys.ALL_VIRTUAL_COLUMN_REAL_AGENT c ON c.tenant_id = t.tenant_id AND c.table_id = t.table_id AND C.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE c.is_hidden = 0 AND t.table_type in (0,2,3,8,9) NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_TAB_COLS select OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_TYPE_MOD, DATA_TYPE_OWNER, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE, DENSITY, NUM_NULLS, NUM_BUCKETS, LAST_ANALYZED, SAMPLE_SIZE, CHARACTER_SET_NAME, CHAR_COL_DECL_LENGTH, GLOBAL_STATS, USER_STATS, AVG_COL_LEN, CHAR_LENGTH, CHAR_USED, V80_FMT_IMAGE, DATA_UPGRADED, HIDDEN_COLUMN, VIRTUAL_COLUMN, SEGMENT_COLUMN_ID, INTERNAL_COLUMN_ID, HISTOGRAM, QUALIFIED_COL_NAME from SYS.dba_tab_cols_v$ NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_TABLESPACES SELECT TABLESPACE_NAME, CAST(NULL AS NUMBER) BLOCK_SIZE, CAST(NULL AS NUMBER) INITIAL_EXTENT, CAST(NULL AS NUMBER) NEXT_EXTENT, CAST(NULL AS NUMBER) MIN_EXTENT, CAST(NULL AS NUMBER) MAX_EXTENT, CAST(NULL AS NUMBER) MAX_SIZE, CAST(NULL AS NUMBER) PCT_INCREASE, CAST(NULL AS NUMBER) MIN_EXTLEN, CAST(NULL AS VARCHAR2(9)) STATUS, CAST(NULL AS VARCHAR2(9)) CONTENTS, CAST(NULL AS VARCHAR2(9)) LOGGING, CAST(NULL AS VARCHAR2(3)) FORCE_LOGGING, CAST(NULL AS VARCHAR2(10)) EXTENT_MANAGEMENT, CAST(NULL AS VARCHAR2(9)) ALLOCATION_TYPE, CAST(NULL AS VARCHAR2(3)) PLUGGED_IN, CAST(NULL AS VARCHAR2(6)) SEGMENT_SPACE_MANAGEMENT, CAST(NULL AS VARCHAR2(8)) DEF_TAB_COMPRESSION, CAST(NULL AS VARCHAR2(11)) RETENTION, CAST(NULL AS VARCHAR2(3)) BIGFILE, CAST(NULL AS VARCHAR2(7)) PREDICATE_EVALUATION, CAST(NULL AS VARCHAR2(3)) ENCRYPTED, CAST(NULL AS VARCHAR2(12)) COMPRESS_FOR FROM SYS.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT WHERE TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_TABLES SELECT CAST(db.database_name AS VARCHAR2(128)) AS OWNER, CAST(t.table_name AS VARCHAR2(128)) AS TABLE_NAME, CAST(tp.tablespace_name AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS VARCHAR2(128)) AS CLUSTER_NAME, CAST(NULL AS VARCHAR2(128)) AS IOT_NAME, CAST('VALID' AS VARCHAR2(8)) AS STATUS, CAST(t."PCTFREE" AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS PCT_USED, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENTS, CAST(NULL AS NUMBER) AS MAX_EXTENTS, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(3)) AS LOGGING, CAST(NULL AS VARCHAR2(1)) AS BACKED_UP, CAST(info.row_count AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS BLOCKS, CAST(NULL AS NUMBER) AS EMPTY_BLOCKS, CAST(NULL AS NUMBER) AS AVG_SPACE, CAST(NULL AS NUMBER) AS CHAIN_CNT, CAST(NULL AS NUMBER) AS AVG_ROW_LEN, CAST(NULL AS NUMBER) AS AVG_SPACE_FREELIST_BLOCKS, CAST(NULL AS NUMBER) AS NUM_FREELIST_BLOCKS, CAST(NULL AS VARCHAR2(40)) AS DEGREE, CAST(NULL AS VARCHAR2(40)) AS INSTANCES, CAST(NULL AS VARCHAR2(20)) AS CACHE, CAST(NULL AS VARCHAR2(8)) AS TABLE_LOCK, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST( CASE WHEN t.part_level = 0 THEN 'NO' ELSE 'YES' END AS VARCHAR2(3)) AS PARTITIONED, CAST(NULL AS VARCHAR2(12)) AS IOT_TYPE, CAST(decode (t.table_type, 8, 'YES', 9, 'YES', 'NO') AS VARCHAR2(1)) AS TEMPORARY, CAST(NULL AS VARCHAR2(1)) AS SECONDARY, CAST('NO' AS VARCHAR2(3)) AS NESTED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(8)) AS ROW_MOVEMENT, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST( decode (t.table_type, 8, 'SYS$SESSION', 9, 'SYS$TRANSACTION', NULL) AS VARCHAR2(15)) AS DURATION, CAST(NULL AS VARCHAR2(8)) AS SKIP_CORRUPT, CAST(NULL AS VARCHAR2(3)) AS MONITORING, CAST(NULL AS VARCHAR2(30)) AS CLUSTER_OWNER, CAST(NULL AS VARCHAR2(8)) AS DEPENDENCIES, CAST(NULL AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS VARCHAR2(12)) AS COMPRESS_FOR, CAST( CASE WHEN db.database_name = '__recyclebin' THEN 'YES' ELSE 'NO' END AS VARCHAR2(3)) AS DROPPED, CAST(NULL AS VARCHAR2(3)) AS READ_ONLY, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED, CAST(NULL AS VARCHAR2(7)) AS RESULT_CACHE FROM ( SELECT tenant_id, table_id, SUM(row_count) AS row_count FROM sys.ALL_VIRTUAL_TENANT_PARTITION_META_TABLE_REAL_AGENT p WHERE p.role = 1 AND P.TENANT_ID = EFFECTIVE_TENANT_ID() GROUP BY tenant_id, table_id ) info RIGHT JOIN sys.ALL_VIRTUAL_TABLE_REAL_AGENT t ON t.tenant_id = info.tenant_id AND t.table_id = info.table_id JOIN sys.ALL_VIRTUAL_DATABASE_REAL_AGENT db ON db.tenant_id = t.tenant_id AND db.database_id = t.database_id AND db.database_name != '__recyclebin' AND t.table_type in (3, 8, 9, 11) AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN sys.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT tp ON tp.tablespace_id = t.tablespace_id AND t.tenant_id = tp.tenant_id AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE t.session_id = 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
......@@ -168,7 +168,7 @@ def SYS DBA_MVIEW_COMMENTS SELECT db.DATABASE_NAME AS OWNER, CAST(t.TABLE_N
def SYS DBA_METHOD_PARAMS SELECT CAST(NULL AS VARCHAR2(30)) AS OWNER, CAST(NULL AS VARCHAR2(30)) AS TYPE_NAME, CAST(NULL AS VARCHAR2(30)) AS METHOD_NAME, CAST(NULL AS NUMBER) AS METHOD_NO, CAST(NULL AS VARCHAR2(30)) AS PARAM_NAME, CAST(NULL AS NUMBER) AS PARAM_NO, CAST(NULL AS VARCHAR2(6)) AS PARAM_MODE, CAST(NULL AS VARCHAR2(7)) AS PARAM_TYPE_MOD, CAST(NULL AS VARCHAR2(30)) AS PARAM_TYPE_OWNER, CAST(NULL AS VARCHAR2(30)) AS PARAM_TYPE_NAME, CAST(NULL AS VARCHAR2(44)) AS CHARACTER_SET_NAME FROM DUAL WHERE 1 = 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_IND_SUBPARTITIONS SELECT CAST(B.INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(B.INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(PART.PART_NAME AS VARCHAR2(128)) AS PARTITION_NAME, CAST(SUB_PART.SUB_PART_NAME AS VARCHAR2(128)) AS SUBPARTITION_NAME, CAST(SUB_PART.HIGH_BOUND_VAL AS VARCHAR2(1024)) AS HIGH_VALUE, CAST(LENGTH(SUB_PART.HIGH_BOUND_VAL) AS NUMBER) AS HIGH_VALUE_LENGTH, SUB_PART.SUB_PART_ID + 1 AS SUBPARTITION_POSITION, CAST(NULL AS VARCHAR2(8)) AS STATUS, CAST(NULL AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENT, CAST(NULL AS NUMBER) AS MAX_EXTENT, CAST(NULL AS NUMBER) AS MAX_SIZE, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) AS LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS INTERVAL, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM( SELECT A.INDEX_OWNER AS INDEX_OWNER, A.INDEX_NAME AS INDEX_NAME, A.INDEX_TABLE_ID AS TABLE_ID, /*INDEX TABLE ID*/ A.DATA_TABLE_ID AS DATA_TABLE_ID, A.PART_LEVEL AS INDEX_TABLE_PART_LEVEL, TB2.PART_LEVEL AS DATA_TABLE_PART_LEVEL, /* CAST(CASE WHEN A.PART_LEVEL=2 THEN 'FALSE' ELSE 'TRUE' END AS VARCHAR2(5)) IS_LOCAL */ CAST('TRUE' AS VARCHAR2(5)) AS IS_LOCAL FROM( SELECT DB.DATABASE_NAME AS INDEX_OWNER, SUBSTR(TB1.TABLE_NAME, 7 + INSTR(SUBSTR(TB1.TABLE_NAME, 7), '_')) AS INDEX_NAME, TB1.TABLE_ID AS INDEX_TABLE_ID, TB1.DATA_TABLE_ID AS DATA_TABLE_ID, TB1.INDEX_TYPE AS INDEX_TYPE, TB1.PART_LEVEL AS PART_LEVEL /*USE DATA TABLE'S PART_LEVEL IF INDEX IS LOCAL INDEX*/ FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB1, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE DB.DATABASE_NAME!='__recyclebin' AND TB1.DATABASE_ID=DB.DATABASE_ID AND TB1.TABLE_TYPE=5 AND TB1.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() ) A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB2 ON A.DATA_TABLE_ID=TB2.TABLE_ID AND TB2.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE A.PART_LEVEL=2 OR ((A.INDEX_TYPE=1 OR A.INDEX_TYPE=2) AND TB2.PART_LEVEL=2) ) B, SYS.ALL_VIRTUAL_PART_REAL_AGENT PART, SYS.ALL_VIRTUAL_SUB_PART_REAL_AGENT SUB_PART WHERE ((B.IS_LOCAL='FALSE' AND B.TABLE_ID=PART.TABLE_ID AND PART.TABLE_ID=SUB_PART.TABLE_ID AND PART.PART_ID=SUB_PART.PART_ID) OR (B.IS_LOCAL='TRUE' AND B.DATA_TABLE_ID=PART.TABLE_ID AND PART.TABLE_ID=SUB_PART.TABLE_ID AND PART.PART_ID=SUB_PART.PART_ID)) AND SUB_PART.TENANT_ID = EFFECTIVE_TENANT_ID() AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_IND_PARTITIONS SELECT CAST(B.INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(B.INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(CASE WHEN PART.SUB_PART_NUM <=0 THEN 'NO' ELSE 'YES' END AS VARCHAR(3)) AS COMPOSITE, CAST(PART.PART_NAME AS VARCHAR2(128)) AS PARTITION_NAME, PART.SUB_PART_NUM AS SUBPARTITION_COUNT, CAST(PART.HIGH_BOUND_VAL AS VARCHAR2(1024)) AS HIGH_VALUE, CAST(LENGTH(PART.HIGH_BOUND_VAL) AS NUMBER) AS HIGH_VALUE_LENGTH, PART.PART_ID + 1 AS PARTITION_POSITION, CAST(NULL AS VARCHAR2(8)) AS STATUS, CAST(NULL AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENT, CAST(NULL AS NUMBER) AS MAX_EXTENT, CAST(NULL AS NUMBER) AS MAX_SIZE, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) AS LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS INTERVAL, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM( SELECT A.INDEX_OWNER AS INDEX_OWNER, A.INDEX_NAME AS INDEX_NAME, A.INDEX_TABLE_ID AS TABLE_ID, /*INDEX TABLE ID*/ A.DATA_TABLE_ID AS DATA_TABLE_ID, CAST(CASE WHEN A.PART_LEVEL=1 THEN 'FALSE' ELSE 'TRUE' END AS VARCHAR2(5)) IS_LOCAL FROM( SELECT DB.DATABASE_NAME AS INDEX_OWNER, SUBSTR(TB1.TABLE_NAME, 7 + INSTR(SUBSTR(TB1.TABLE_NAME, 7), '_')) AS INDEX_NAME, TB1.TABLE_ID AS INDEX_TABLE_ID, TB1.DATA_TABLE_ID AS DATA_TABLE_ID, TB1.INDEX_TYPE AS INDEX_TYPE, TB1.PART_LEVEL AS PART_LEVEL /*USE DATA TABLE'S PART_LEVEL IF INDEX IS LOCAL INDEX*/ FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB1, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE DB.DATABASE_NAME!='__recyclebin' AND TB1.DATABASE_ID=DB.DATABASE_ID AND TB1.TABLE_TYPE=5 AND TB1.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() ) A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB2 ON A.DATA_TABLE_ID=TB2.TABLE_ID AND TB2.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE A.PART_LEVEL=1 OR ((A.INDEX_TYPE=1 OR A.INDEX_TYPE=2) AND TB2.PART_LEVEL=1) ) B JOIN SYS.ALL_VIRTUAL_PART_REAL_AGENT PART ON ((B.TABLE_ID=PART.TABLE_ID AND B.IS_LOCAL='FALSE') OR (B.DATA_TABLE_ID=PART.TABLE_ID AND B.IS_LOCAL='TRUE')) AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_IND_EXPRESSIONS SELECT CAST(INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(H.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_EXPRESSION /* TODO: LONG */ AS VARCHAR2(1000)) AS COLUMN_EXPRESSION, COLUMN_POSITION FROM ( SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, F.CUR_DEFAULT_VALUE_V2 AS COLUMN_EXPRESSION, E.INDEX_POSITION AS COLUMN_POSITION, E.TABLE_ID AS TABLE_ID FROM (SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, C.TABLE_ID AS TABLE_ID, C.INDEX_ID AS INDEX_ID, D.COLUMN_ID AS COLUMN_ID, D.COLUMN_NAME AS COLUMN_NAME, D.INDEX_POSITION AS INDEX_POSITION FROM (SELECT DATABASE_NAME AS INDEX_OWNER, SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) AS INDEX_NAME, DATABASE_NAME AS TABLE_OWNER, A.DATA_TABLE_ID AS TABLE_ID, A.TABLE_ID AS INDEX_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND B.DATABASE_NAME != '__recyclebin' AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE TABLE_TYPE=5 ) C JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT D ON C.INDEX_ID=D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID()) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON F.TABLE_ID=E.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() AND F.COLUMN_ID=E.COLUMN_ID AND F.COLUMN_FLAGS=1) G JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT H ON G.TABLE_ID=H.TABLE_ID AND H.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_IND_EXPRESSIONS SELECT CAST(INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(H.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_EXPRESSION /* TODO: LONG */ AS VARCHAR2(1000)) AS COLUMN_EXPRESSION, COLUMN_POSITION FROM ( SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, F.CUR_DEFAULT_VALUE_V2 AS COLUMN_EXPRESSION, E.INDEX_POSITION AS COLUMN_POSITION, E.TABLE_ID AS TABLE_ID FROM (SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, C.TABLE_ID AS TABLE_ID, C.INDEX_ID AS INDEX_ID, D.COLUMN_ID AS COLUMN_ID, D.COLUMN_NAME AS COLUMN_NAME, D.INDEX_POSITION AS INDEX_POSITION FROM (SELECT DATABASE_NAME AS INDEX_OWNER, SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) AS INDEX_NAME, DATABASE_NAME AS TABLE_OWNER, A.DATA_TABLE_ID AS TABLE_ID, A.TABLE_ID AS INDEX_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND B.DATABASE_NAME != '__recyclebin' AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE TABLE_TYPE=5 ) C JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT D ON C.INDEX_ID=D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() AND D.INDEX_POSITION != 0) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON F.TABLE_ID=E.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() AND F.COLUMN_ID=E.COLUMN_ID AND BITAND(F.COLUMN_FLAGS,3) > 0) G JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT H ON G.TABLE_ID=H.TABLE_ID AND H.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_IND_COLUMNS SELECT CAST(INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_NAME AS VARCHAR2(4000)) AS COLUMN_NAME, CAST(ROWKEY_POSITION AS NUMBER) AS COLUMN_POSITION, CASE WHEN DATA_TYPE >= 1 AND DATA_TYPE <= 16 THEN CAST(22 AS NUMBER) WHEN DATA_TYPE = 17 THEN CAST(7 AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 2 THEN CAST(DATA_LENGTH AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 1 AND F.COLLATION_TYPE IN (45, 46, 224, 54, 55, 101) THEN CAST(DATA_LENGTH * 4 AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 1 AND F.COLLATION_TYPE IN (28, 87) THEN CAST(DATA_LENGTH * 2 AS NUMBER) WHEN DATA_TYPE = 36 THEN CAST(12 AS NUMBER) WHEN DATA_TYPE IN (37, 38) THEN CAST(11 AS NUMBER) WHEN DATA_TYPE = 39 THEN CAST(DATA_LENGTH AS NUMBER) WHEN DATA_TYPE = 40 THEN CAST(5 AS NUMBER) WHEN DATA_TYPE = 41 THEN CAST(11 AS NUMBER) ELSE CAST(0 AS NUMBER) END AS COLUMN_LENGTH, CASE WHEN DATA_TYPE IN (22, 23) THEN CAST(DATA_LENGTH AS NUMBER) ELSE CAST(0 AS NUMBER) END AS CHAR_LENGTH, CAST('ASC' AS VARCHAR2(4)) AS DESCEND FROM (SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, TABLE_NAME, INDEX_ID, IDX_TYPE FROM (SELECT DATABASE_NAME AS INDEX_OWNER, CASE WHEN (TABLE_TYPE = 5) THEN SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) ELSE (CONS_TAB.CONSTRAINT_NAME) END AS INDEX_NAME, DATABASE_NAME AS TABLE_OWNER, CASE WHEN (TABLE_TYPE = 3) THEN A.TABLE_ID ELSE A.DATA_TABLE_ID END AS TABLE_ID, A.TABLE_ID AS INDEX_ID, TABLE_TYPE AS IDX_TYPE FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND TABLE_TYPE IN (5, 3) AND B.DATABASE_NAME != '__recyclebin' AND A.TENANT_ID = B.TENANT_ID AND A.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_CONSTRAINT_REAL_AGENT CONS_TAB ON (CONS_TAB.TABLE_ID = A.TABLE_ID AND A.TENANT_ID = CONS_TAB.TENANT_ID AND CONS_TAB.TENANT_ID = EFFECTIVE_TENANT_ID()) WHERE NOT( TABLE_TYPE = 3 AND CONSTRAINT_NAME IS NULL ) ) C JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT D ON C.TABLE_ID = D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() ) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON E.INDEX_ID = F.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE F.ROWKEY_POSITION != 0 AND (CASE WHEN IDX_TYPE = 5 THEN INDEX_POSITION ELSE 1 END) != 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_INDEXES SELECT CAST(INDEX_OWNER AS VARCHAR2(128)) AS OWNER, CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(INDEX_TYPE_NAME AS VARCHAR2(27)) AS INDEX_TYPE, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST('TABLE' AS CHAR(5)) AS TABLE_TYPE, CAST(UNIQUENESS AS VARCHAR2(9)) AS UNIQUENESS, CAST(COMPRESSION AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS PREFIX_LENGTH, CAST(TABLESPACE_NAME AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENTS, CAST(NULL AS NUMBER) AS MAX_EXTENTS, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS PCT_THRESHOLD, CAST(NULL AS NUMBER) AS INCLUDE_COLUMN, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS VARCHAR2(3)) AS LOGGING, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(STATUS AS VARCHAR2(10)) AS STATUS, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(40)) AS DEGREE, CAST(NULL AS VARCHAR2(40)) AS INSTANCES, CAST(CASE WHEN A_TABLE_TYPE = 3 THEN 'NO' WHEN A_INDEX_TYPE = 1 OR A_INDEX_TYPE = 2 THEN (CASE WHEN D.PART_LEVEL = 0 THEN 'NO' ELSE 'YES' END) ELSE (CASE WHEN A_PART_LEVEL = 0 THEN 'NO' ELSE 'YES' END) END AS VARCHAR2(3)) AS PARTITIONED, CAST(NULL AS VARCHAR2(1)) AS TEMPORARY, CAST(NULL AS VARCHAR2(1)) AS "GENERATED", CAST(NULL AS VARCHAR2(1)) AS SECONDARY, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS VARCHAR2(15)) AS DURATION, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(30)) AS ITYP_OWNER, CAST(NULL AS VARCHAR2(30)) AS ITYP_NAME, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(12)) AS DOMIDX_STATUS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(FUNCIDX_STATUS AS VARCHAR2(8)) AS FUNCIDX_STATUS, CAST('NO' AS VARCHAR2(3)) AS JOIN_INDEX, CAST(NULL AS VARCHAR2(3)) AS IOT_REDUNDANT_PKEY_ELIM, CAST(DROPPED AS VARCHAR2(9)) AS DROPPED, CAST(VISIBILITY AS VARCHAR2(10)) AS VISIBILITY, CAST(NULL AS VARCHAR2(14)) AS DOMIDX_MANAGEMENT, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM (SELECT DATABASE_NAME AS INDEX_OWNER, CASE WHEN (TABLE_TYPE = 5 AND B.DATABASE_NAME != '__recyclebin') THEN SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) WHEN (TABLE_TYPE = 5 AND B.DATABASE_NAME = '__recyclebin') THEN TABLE_NAME ELSE (CONS_TAB.CONSTRAINT_NAME) END AS INDEX_NAME, CASE WHEN A.TABLE_TYPE = 5 AND EXISTS ( SELECT 1 FROM SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT T_COL_INDEX, SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT T_COL_BASE WHERE T_COL_BASE.TABLE_ID = A.DATA_TABLE_ID AND T_COL_BASE.COLUMN_NAME = T_COL_INDEX.COLUMN_NAME AND T_COL_INDEX.TABLE_ID = A.TABLE_ID AND T_COL_BASE.TENANT_ID = A.TENANT_ID AND T_COL_INDEX.TENANT_ID = A.TENANT_ID AND BITAND(T_COL_BASE.COLUMN_FLAGS,3) > 0 ) THEN 'FUNCTION-BASED NORMAL' ELSE 'NORMAL' END AS INDEX_TYPE_NAME, DATABASE_NAME AS TABLE_OWNER, CASE WHEN (TABLE_TYPE = 3) THEN A.TABLE_ID ELSE A.DATA_TABLE_ID END AS TABLE_ID, A.TABLE_ID AS INDEX_ID, CASE WHEN TABLE_TYPE = 3 THEN 'UNIQUE' WHEN A.INDEX_TYPE IN (2, 4, 8) THEN 'UNIQUE' ELSE 'NONUNIQUE' END AS UNIQUENESS, CASE WHEN A.COMPRESS_FUNC_NAME = NULL THEN 'DISABLED' ELSE 'ENABLED' END AS COMPRESSION, CASE WHEN TABLE_TYPE = 3 THEN 'VALID' WHEN A.INDEX_STATUS = 2 THEN 'VALID' WHEN A.INDEX_STATUS = 3 THEN 'CHECKING' WHEN A.INDEX_STATUS = 4 THEN 'INELEGIBLE' WHEN A.INDEX_STATUS = 5 THEN 'ERROR' ELSE 'UNUSABLE' END AS STATUS, A.INDEX_TYPE AS A_INDEX_TYPE, A.PART_LEVEL AS A_PART_LEVEL, A.TABLE_TYPE AS A_TABLE_TYPE, CASE WHEN 0 = (SELECT COUNT(1) FROM SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT WHERE TABLE_ID = A.TABLE_ID AND IS_HIDDEN = 0 AND TENANT_ID = EFFECTIVE_TENANT_ID()) THEN 'ENABLED' ELSE 'NULL' END AS FUNCIDX_STATUS, CASE WHEN B.DATABASE_NAME = '__recyclebin' THEN 'YES' ELSE 'NO' END AS DROPPED, CASE WHEN BITAND(A.INDEX_ATTRIBUTES_SET, 1) = 0 THEN 'VISIBLE' ELSE 'INVISIBLE' END AS VISIBILITY, A.TABLESPACE_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND TABLE_TYPE IN (5, 3) AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_CONSTRAINT_REAL_AGENT CONS_TAB ON (CONS_TAB.TABLE_ID = A.TABLE_ID) AND CONS_TAB.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE NOT(TABLE_TYPE = 3 AND CONSTRAINT_NAME IS NULL) AND (CONS_TAB.CONSTRAINT_TYPE IS NULL OR CONS_TAB.CONSTRAINT_TYPE = 1) ) C JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT D ON C.TABLE_ID = D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT TP ON C.TABLESPACE_ID = TP.TABLESPACE_ID AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS DBA_ERRORS SELECT CAST(o.owner AS VARCHAR2(128)) AS OWNER, CAST(o.object_name AS VARCHAR2(128)) AS NAME, CAST(o.object_type AS VARCHAR2(19)) AS TYPE, CAST(e.obj_seq AS NUMBER) AS SEQUENCE, CAST(e.line AS NUMBER) AS LINE, CAST(e.position AS NUMBER) AS POSITION, CAST(e.text as VARCHAR2(4000)) AS TEXT, CAST(DECODE(e.property, 0, 'ERROR', 1, 'WARNING', 'UNDEFINED') AS VARCHAR2(9)) AS ATTRIBUTE, CAST(e.error_number AS NUMBER) AS MESSAGE_NUMBER FROM all_objects o, (select obj_id, obj_seq, line, position, text, property, error_number, CAST( UPPER(decode(obj_type, 3, 'PACKAGE', 4, 'TYPE', 5, 'PACKAGE BODY', 6, 'TYPE BODY', 7, 'TRIGGER', 8, 'VIEW', 9, 'FUNCTION', 12, 'PROCEDURE', 'MAXTYPE')) AS VARCHAR2(23)) object_type from sys.ALL_VIRTUAL_TENANT_ERROR_REAL_AGENT WHERE TENANT_ID = EFFECTIVE_TENANT_ID()) e WHERE o.object_id = e.obj_id AND o.object_type like e.object_type AND o.object_type IN (UPPER('package'), UPPER('type'), UPPER('procedure'), UPPER('function'), UPPER('package body'), UPPER('view'), UPPER('trigger'), UPPER('type body'), UPPER('library'), UPPER('queue'), UPPER('java source'), UPPER('java class'), UPPER('dimension'), UPPER('assembly'), UPPER('hierarchy'), UPPER('arrtibute dimension'), UPPER('analytic view')) NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
......@@ -191,7 +191,7 @@ def SYS ALL_TAB_PRIVS SELECT B.USER_NAME AS GRANTOR, C.USER_NAME AS
def SYS ALL_TAB_PARTITIONS SELECT CAST(DB_TB.DATABASE_NAME AS VARCHAR2(128)) TABLE_OWNER, CAST(DB_TB.TABLE_NAME AS VARCHAR2(128)) TABLE_NAME, CAST(CASE WHEN PART.SUB_PART_NUM <=0 THEN 'NO' ELSE 'YES' END AS VARCHAR(3)) COMPOSITE, CAST(PART.PART_NAME AS VARCHAR(128)) PARTITION_NAME, CAST(PART.SUB_PART_NUM AS NUMBER) SUBPARTITION_COUNT, CAST(CASE WHEN length(PART.HIGH_BOUND_VAL) > 0 THEN PART.HIGH_BOUND_VAL ELSE PART.LIST_VAL END AS VARCHAR2(1024)) HIGH_VALUE, CAST(CASE WHEN length(PART.HIGH_BOUND_VAL) > 0 THEN length(PART.HIGH_BOUND_VAL) ELSE length(PART.LIST_VAL) END AS NUMBER) HIGH_VALUE_LENGTH, CAST(PART.PART_ID + 1 AS NUMBER) PARTITION_POSITION, CAST(TP.TABLESPACE_NAME AS VARCHAR2(30)) TABLESPACE_NAME, CAST(NULL AS NUMBER) PCT_FREE, CAST(NULL AS NUMBER) PCT_USED, CAST(NULL AS NUMBER) INI_TRANS, CAST(NULL AS NUMBER) MAX_TRANS, CAST(NULL AS NUMBER) INITIAL_EXTENT, CAST(NULL AS NUMBER) NEXT_EXTENT, CAST(NULL AS NUMBER) MIN_EXTENT, CAST(NULL AS NUMBER) MAX_EXTENT, CAST(NULL AS NUMBER) MAX_SIZE, CAST(NULL AS NUMBER) PCT_INCREASE, CAST(NULL AS NUMBER) FREELISTS, CAST(NULL AS NUMBER) FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) COMPRESSION, CAST(PART.COMPRESS_FUNC_NAME AS VARCHAR2(12)) COMPRESS_FOR, CAST(NULL AS NUMBER) NUM_ROWS, CAST(NULL AS NUMBER) BLOCKS, CAST(NULL AS NUMBER) EMPTY_BLOCKS, CAST(NULL AS NUMBER) AVG_SPACE, CAST(NULL AS NUMBER) CHAIN_CNT, CAST(NULL AS NUMBER) AVG_ROW_LEN, CAST(NULL AS NUMBER) SAMPLE_SIZE, CAST(NULL AS DATE) LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) GLOBAL_STATS, CAST(NULL AS VARCHAR2(3)) USER_STATS, CAST(NULL AS VARCHAR2(3)) IS_NESTED, CAST(NULL AS VARCHAR2(30)) PARENT_TABLE_PARTITION, CAST(NULL AS VARCHAR2(3)) "INTERVAL", CAST(NULL AS VARCHAR2(4)) SEGMENT_CREATED FROM (SELECT DB.DATABASE_NAME, DB.DATABASE_ID, TB.TABLE_ID, TB.TABLE_NAME FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE TB.DATABASE_ID = DB.DATABASE_ID AND TB.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() AND (TB.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(1, TB.TABLE_ID, TB.DATABASE_ID) = 1)) DB_TB JOIN SYS.ALL_VIRTUAL_PART_REAL_AGENT PART ON DB_TB.TABLE_ID = PART.TABLE_ID AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT TP ON TP.TABLESPACE_ID = PART.TABLESPACE_ID AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_TAB_COMMENTS SELECT A.DATABASE_NAME AS OWNER, CAST(B.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(CASE WHEN TABLE_TYPE = 0 OR TABLE_TYPE = 2 OR TABLE_TYPE = 3 OR TABLE_TYPE = 5 OR TABLE_TYPE = 8 OR TABLE_TYPE = 9 THEN 'TABLE' WHEN TABLE_TYPE = 1 OR TABLE_TYPE = 4 OR TABLE_TYPE = 7 THEN 'VIEW' ELSE NULL END AS VARCHAR2(11)) AS TABLE_TYPE, CAST(B."COMMENT" AS VARCHAR(4000)) AS COMMENTS FROM SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() AND (A.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(1, TABLE_ID, A.DATABASE_ID) = 1) NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_TAB_COLUMNS select OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_TYPE_MOD, DATA_TYPE_OWNER, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE, DENSITY, NUM_NULLS, NUM_BUCKETS, LAST_ANALYZED, SAMPLE_SIZE, CHARACTER_SET_NAME, CHAR_COL_DECL_LENGTH, GLOBAL_STATS, USER_STATS, AVG_COL_LEN, CHAR_LENGTH, CHAR_USED, V80_FMT_IMAGE, DATA_UPGRADED, HISTOGRAM from SYS.ALL_TAB_COLS NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_TAB_COLS_V$ SELECT cast(db.database_name as VARCHAR2(128)) as OWNER, cast(t.table_name as VARCHAR2(128)) as TABLE_NAME, cast(c.column_name as VARCHAR2(128)) as COLUMN_NAME, cast(decode(c.data_type, 0, 'NULL', 1, 'NUMBER', 2, 'NUMBER', 3, 'NUMBER', 4, 'NUMBER', 5, 'NUMBER', 6, 'NUMBER', 7, 'NUMBER', 8, 'NUMBER', 9, 'NUMBER', 10, 'NUMBER', 11, 'BINARY_FLOAT', 12, 'BINARY_DOUBLE', 13, 'NUMBER', 14, 'NUMBER', 15, 'NUMBER', 16, 'NUMBER', 17, 'DATE', 18, 'TIMESTAMP', 19, 'DATE', 20, 'TIME', 21, 'YEAR', 22, 'VARCHAR2', 23, 'CHAR', 24, 'HEX_STRING', 25, 'EXT', 26, 'UNKNOWN', 27, 'TINYTEXT', 28, 'TEXT', 29, 'MEDIUMTEXT', 30, decode(c.collation_type, 63, 'BLOB', 'CLOB'), 31, 'BIT', 32, 'ENUM', 33, 'SET', 34, 'ENUM_INNER', 35, 'SET_INNER', 36, concat('TIMESTAMP(', concat(c.data_scale, ') WITH TIME ZONE')), 37, concat('TIMESTAMP(', concat(c.data_scale, ') WITH LOCAL TIME ZONE')), 38, concat('TIMESTAMP(', concat(c.data_scale, ')')), 39, 'RAW', 40, concat('INTERVAL YEAR(', concat(c.data_scale, ') TO MONTH')), 41, concat('INTERVAL DAY(', concat(trunc(c.data_scale/10), concat(') TO SECOND(', concat(mod(c.data_scale, 10), ')')))), 42, 'FLOAT', 43, 'NVARCHAR2', 44, 'NCHAR', 45, 'UROWID', 46, '', 'UNDEFINED') as VARCHAR2(128)) as DATA_TYPE, cast(NULL as VARCHAR2(3)) as DATA_TYPE_MOD, cast(NULL as VARCHAR2(128)) as DATA_TYPE_OWNER, cast(c.data_length as NUMBER) as DATA_LENGTH, cast(CASE WHEN c.data_type in (11,12,17,18,19,22,23,27,28,29,30,36,37,38,43,44) THEN NULL ELSE CASE WHEN c.data_precision < 0 THEN NULL ELSE c.data_precision END END as NUMBER) as DATA_PRECISION, cast(CASE WHEN c.data_type in (11,12,17,19,22,23,27,28,29,30,42,43,44) THEN NULL ELSE CASE WHEN c.data_scale < -84 THEN NULL ELSE c.data_scale END END as NUMBER) as DATA_SCALE, cast(decode(c.nullable, 1, 'Y', 'N') as VARCHAR2(1)) as NULLABLE, cast(decode(BITAND(c.column_flags, 64), 0, c.column_id, NULL) as NUMBER) as COLUMN_ID, cast(LENGTHB(c.cur_default_value_v2) as NUMBER) as DEFAULT_LENGTH, cast(c.cur_default_value_v2 as /* TODO: LONG() */ VARCHAR(128)) as DATA_DEFAULT, cast(NULL as NUMBER) as NUM_DISTINCT, cast(NULL as /* TODO: RAW */ varchar(128)) as LOW_VALUE, cast(NULL as /* TODO: RAW */ varchar(128)) as HIGH_VALUE, cast(NULL as NUMBER) as DENSITY, cast(NULL as NUMBER) as NUM_NULLS, cast(NULL as NUMBER) as NUM_BUCKETS, cast(NULL as DATE) as LAST_ANALYZED, cast(NULL as NUMBER) as SAMPLE_SIZE, cast(NULL as VARCHAR2(44)) as CHARACTER_SET_NAME, cast(NULL as NUMBER) as CHAR_COL_DECL_LENGTH, cast(NULL as VARCHAR2(3)) as GLOBAL_STATS, cast(NULL as VARCHAR2(3)) as USER_STATS, cast(NULL as VARCHAR2(80)) as NOTES, cast(NULL as NUMBER) as AVG_COL_LEN, cast(decode(c.data_type, 22, c.data_length, 23, c.data_length, 0) as NUMBER) as CHAR_LENGTH, cast(decode(c.data_type, 22, decode(c.data_precision, 1, 'C', 'B'), 23, decode(c.data_precision, 1, 'C', 'B'), NULL) as VARCHAR2(1)) as CHAR_USED, cast(NULL as VARCHAR2(3)) as V80_FMT_IMAGE, cast(NULL as VARCHAR2(3)) as DATA_UPGRADED, cast(decode(BITAND(c.column_flags, 64), 0, 'NO', 'YES') as VARCHAR2(3)) as HIDDEN_COLUMN, cast(decode(BITAND(c.column_flags, 1), 1, 'YES', 'NO') as VARCHAR2(3)) as VIRTUAL_COLUMN, cast(NULL as NUMBER) as SEGMENT_COLUMN_ID, cast(NULL as NUMBER) as INTERNAL_COLUMN_ID, cast(NULL as VARCHAR2(15)) as HISTOGRAM, cast(c.column_name as VARCHAR2(4000)) as QUALIFIED_COL_NAME, cast('YES' as VARCHAR2(3)) as USER_GENERATED, cast(NULL as VARCHAR2(3)) as DEFAULT_ON_NULL, cast(NULL as VARCHAR2(3)) as IDENTITY_COLUMN, cast(NULL as VARCHAR2(128)) as EVALUATION_EDITION, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEFORE, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEGINNING, cast(NULL as VARCHAR2(100)) as COLLATION, cast(NULL as NUMBER) as COLLATED_COLUMN_ID FROM sys.ALL_VIRTUAL_TABLE_REAL_AGENT t JOIN sys.ALL_VIRTUAL_DATABASE_REAL_AGENT db ON db.tenant_id = t.tenant_id AND db.database_id = t.database_id AND (t.database_id = userenv('SCHEMAID') OR user_can_access_obj(1, t.table_id, t.database_id) = 1) AND T.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() JOIN sys.ALL_VIRTUAL_COLUMN_REAL_AGENT c ON c.tenant_id = t.tenant_id AND c.table_id = t.table_id AND C.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE c.is_hidden = 0 AND t.table_type in (0,2,3,8,9) NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_TAB_COLS_V$ SELECT cast(db.database_name as VARCHAR2(128)) as OWNER, cast(t.table_name as VARCHAR2(128)) as TABLE_NAME, cast(c.column_name as VARCHAR2(128)) as COLUMN_NAME, cast(decode(c.data_type, 0, 'NULL', 1, 'NUMBER', 2, 'NUMBER', 3, 'NUMBER', 4, 'NUMBER', 5, 'NUMBER', 6, 'NUMBER', 7, 'NUMBER', 8, 'NUMBER', 9, 'NUMBER', 10, 'NUMBER', 11, 'BINARY_FLOAT', 12, 'BINARY_DOUBLE', 13, 'NUMBER', 14, 'NUMBER', 15, 'NUMBER', 16, 'NUMBER', 17, 'DATE', 18, 'TIMESTAMP', 19, 'DATE', 20, 'TIME', 21, 'YEAR', 22, 'VARCHAR2', 23, 'CHAR', 24, 'HEX_STRING', 25, 'EXT', 26, 'UNKNOWN', 27, 'TINYTEXT', 28, 'TEXT', 29, 'MEDIUMTEXT', 30, decode(c.collation_type, 63, 'BLOB', 'CLOB'), 31, 'BIT', 32, 'ENUM', 33, 'SET', 34, 'ENUM_INNER', 35, 'SET_INNER', 36, concat('TIMESTAMP(', concat(c.data_scale, ') WITH TIME ZONE')), 37, concat('TIMESTAMP(', concat(c.data_scale, ') WITH LOCAL TIME ZONE')), 38, concat('TIMESTAMP(', concat(c.data_scale, ')')), 39, 'RAW', 40, concat('INTERVAL YEAR(', concat(c.data_scale, ') TO MONTH')), 41, concat('INTERVAL DAY(', concat(trunc(c.data_scale/10), concat(') TO SECOND(', concat(mod(c.data_scale, 10), ')')))), 42, 'FLOAT', 43, 'NVARCHAR2', 44, 'NCHAR', 45, 'UROWID', 46, '', 'UNDEFINED') as VARCHAR2(128)) as DATA_TYPE, cast(NULL as VARCHAR2(3)) as DATA_TYPE_MOD, cast(NULL as VARCHAR2(128)) as DATA_TYPE_OWNER, cast(c.data_length * CASE WHEN c.data_type in (22,23,30,43,44,46) and c.data_precision = 1 THEN decode(c.collation_type, 63, 1, 249, 4, 248, 4, 87, 2, 28, 2, 55, 4, 54, 4, 101, 2, 46, 4, 45, 4, 224, 4, 1) ELSE 1 END as NUMBER) as DATA_LENGTH, cast(CASE WHEN c.data_type in (11,12,17,18,19,22,23,27,28,29,30,36,37,38,43,44) THEN NULL ELSE CASE WHEN c.data_precision < 0 THEN NULL ELSE c.data_precision END END as NUMBER) as DATA_PRECISION, cast(CASE WHEN c.data_type in (11,12,17,19,22,23,27,28,29,30,42,43,44) THEN NULL ELSE CASE WHEN c.data_scale < -84 THEN NULL ELSE c.data_scale END END as NUMBER) as DATA_SCALE, cast(decode(c.nullable, 1, 'Y', 'N') as VARCHAR2(1)) as NULLABLE, cast(decode(BITAND(c.column_flags, 64), 0, c.column_id, NULL) as NUMBER) as COLUMN_ID, cast(LENGTHB(c.cur_default_value_v2) as NUMBER) as DEFAULT_LENGTH, cast(c.cur_default_value_v2 as /* TODO: LONG() */ VARCHAR(128)) as DATA_DEFAULT, cast(NULL as NUMBER) as NUM_DISTINCT, cast(NULL as /* TODO: RAW */ varchar(128)) as LOW_VALUE, cast(NULL as /* TODO: RAW */ varchar(128)) as HIGH_VALUE, cast(NULL as NUMBER) as DENSITY, cast(NULL as NUMBER) as NUM_NULLS, cast(NULL as NUMBER) as NUM_BUCKETS, cast(NULL as DATE) as LAST_ANALYZED, cast(NULL as NUMBER) as SAMPLE_SIZE, cast(decode(c.data_type, 22, 'CHAR_CS', 23, 'CHAR_CS', 30, decode(c.collation_type, 63, 'NULL', 'CHAR_CS'), 43, 'NCHAR_CS', 44, 'NCHAR_CS', '') as VARCHAR2(44)) as CHARACTER_SET_NAME, cast(NULL as NUMBER) as CHAR_COL_DECL_LENGTH, cast(NULL as VARCHAR2(3)) as GLOBAL_STATS, cast(NULL as VARCHAR2(3)) as USER_STATS, cast(NULL as VARCHAR2(80)) as NOTES, cast(NULL as NUMBER) as AVG_COL_LEN, cast(CASE WHEN c.data_type in (22,23,43,44) THEN c.data_length ELSE 0 END as NUMBER) as CHAR_LENGTH, cast(decode(c.data_type, 22, decode(c.data_precision, 1, 'C', 'B'), 23, decode(c.data_precision, 1, 'C', 'B'), 43, decode(c.data_precision, 1, 'C', 'B'), 44, decode(c.data_precision, 1, 'C', 'B'), NULL) as VARCHAR2(1)) as CHAR_USED, cast(NULL as VARCHAR2(3)) as V80_FMT_IMAGE, cast(NULL as VARCHAR2(3)) as DATA_UPGRADED, cast(decode(BITAND(c.column_flags, 64), 0, 'NO', 'YES') as VARCHAR2(3)) as HIDDEN_COLUMN, cast(decode(BITAND(c.column_flags, 1), 1, 'YES', 'NO') as VARCHAR2(3)) as VIRTUAL_COLUMN, cast(NULL as NUMBER) as SEGMENT_COLUMN_ID, cast(NULL as NUMBER) as INTERNAL_COLUMN_ID, cast(NULL as VARCHAR2(15)) as HISTOGRAM, cast(c.column_name as VARCHAR2(4000)) as QUALIFIED_COL_NAME, cast('YES' as VARCHAR2(3)) as USER_GENERATED, cast(NULL as VARCHAR2(3)) as DEFAULT_ON_NULL, cast(NULL as VARCHAR2(3)) as IDENTITY_COLUMN, cast(NULL as VARCHAR2(128)) as EVALUATION_EDITION, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEFORE, cast(NULL as VARCHAR2(128)) as UNUSABLE_BEGINNING, cast(NULL as VARCHAR2(100)) as COLLATION, cast(NULL as NUMBER) as COLLATED_COLUMN_ID FROM sys.ALL_VIRTUAL_TABLE_REAL_AGENT t JOIN sys.ALL_VIRTUAL_DATABASE_REAL_AGENT db ON db.tenant_id = t.tenant_id AND db.database_id = t.database_id AND (t.database_id = userenv('SCHEMAID') OR user_can_access_obj(1, t.table_id, t.database_id) = 1) AND T.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() JOIN sys.ALL_VIRTUAL_COLUMN_REAL_AGENT c ON c.tenant_id = t.tenant_id AND c.table_id = t.table_id AND C.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE c.is_hidden = 0 AND t.table_type in (0,2,3,8,9) NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_TAB_COLS select OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_TYPE_MOD, DATA_TYPE_OWNER, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE, DENSITY, NUM_NULLS, NUM_BUCKETS, LAST_ANALYZED, SAMPLE_SIZE, CHARACTER_SET_NAME, CHAR_COL_DECL_LENGTH, GLOBAL_STATS, USER_STATS, AVG_COL_LEN, CHAR_LENGTH, CHAR_USED, V80_FMT_IMAGE, DATA_UPGRADED, HIDDEN_COLUMN, VIRTUAL_COLUMN, SEGMENT_COLUMN_ID, INTERNAL_COLUMN_ID, HISTOGRAM, QUALIFIED_COL_NAME from SYS.all_tab_cols_v$ NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_TABLES SELECT CAST(db.database_name AS VARCHAR2(128)) AS OWNER, CAST(t.table_name AS VARCHAR2(128)) AS TABLE_NAME, CAST(tp.tablespace_name AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS VARCHAR2(128)) AS CLUSTER_NAME, CAST(NULL AS VARCHAR2(128)) AS IOT_NAME, CAST('VALID' AS VARCHAR2(8)) AS STATUS, CAST(t."PCTFREE" AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS PCT_USED, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENTS, CAST(NULL AS NUMBER) AS MAX_EXTENTS, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(3)) AS LOGGING, CAST(NULL AS VARCHAR2(1)) AS BACKED_UP, CAST(info.row_count AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS BLOCKS, CAST(NULL AS NUMBER) AS EMPTY_BLOCKS, CAST(NULL AS NUMBER) AS AVG_SPACE, CAST(NULL AS NUMBER) AS CHAIN_CNT, CAST(NULL AS NUMBER) AS AVG_ROW_LEN, CAST(NULL AS NUMBER) AS AVG_SPACE_FREELIST_BLOCKS, CAST(NULL AS NUMBER) AS NUM_FREELIST_BLOCKS, CAST(NULL AS VARCHAR2(40)) AS DEGREE, CAST(NULL AS VARCHAR2(40)) AS INSTANCES, CAST(NULL AS VARCHAR2(20)) AS CACHE, CAST(NULL AS VARCHAR2(8)) AS TABLE_LOCK, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST( CASE WHEN t.part_level = 0 THEN 'NO' ELSE 'YES' END AS VARCHAR2(3)) AS PARTITIONED, CAST(NULL AS VARCHAR2(12)) AS IOT_TYPE, CAST(decode (t.table_type, 8, 'YES', 9, 'YES', 'NO') AS VARCHAR2(1)) AS TEMPORARY, CAST(NULL AS VARCHAR2(1)) AS SECONDARY, CAST('NO' AS VARCHAR2(3)) AS NESTED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(8)) AS ROW_MOVEMENT, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST( decode (t.table_type, 8, 'SYS$SESSION', 9, 'SYS$TRANSACTION', NULL) AS VARCHAR2(15)) AS DURATION, CAST(NULL AS VARCHAR2(8)) AS SKIP_CORRUPT, CAST(NULL AS VARCHAR2(3)) AS MONITORING, CAST(NULL AS VARCHAR2(30)) AS CLUSTER_OWNER, CAST(NULL AS VARCHAR2(8)) AS DEPENDENCIES, CAST(NULL AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS VARCHAR2(12)) AS COMPRESS_FOR, CAST( CASE WHEN db.database_name = '__recyclebin' THEN 'YES' ELSE 'NO' END AS VARCHAR2(3)) AS DROPPED, CAST(NULL AS VARCHAR2(3)) AS READ_ONLY, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED, CAST(NULL AS VARCHAR2(7)) AS RESULT_CACHE FROM ( SELECT tenant_id, table_id, SUM(row_count) AS row_count FROM sys.ALL_VIRTUAL_TENANT_PARTITION_META_TABLE_REAL_AGENT p WHERE p.role = 1 AND P.TENANT_ID = EFFECTIVE_TENANT_ID() GROUP BY tenant_id, table_id ) info RIGHT JOIN sys.ALL_VIRTUAL_TABLE_REAL_AGENT t ON t.tenant_id = info.tenant_id AND t.table_id = info.table_id AND T.TENANT_ID = EFFECTIVE_TENANT_ID() JOIN sys.ALL_VIRTUAL_DATABASE_REAL_AGENT db ON db.tenant_id = t.tenant_id AND db.database_id = t.database_id AND db.database_name != '__recyclebin' AND t.table_type in (3, 8, 9, 11) AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() AND (t.database_id = USERENV('SCHEMAID') or user_can_access_obj(1, t.table_id, t.database_id) =1) LEFT JOIN sys.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT tp ON tp.tablespace_id = t.tablespace_id AND t.tenant_id = tp.tenant_id AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE t.session_id = 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_SYNONYMS SELECT CASE WHEN A.DATABASE_NAME = '__public' THEN 'PUBLIC' ELSE A.DATABASE_NAME END AS OWNER, A.SYNONYM_NAME AS SYNONYM_NAME, CAST(CASE WHEN INSTR(A.OBJECT_NAME, '@') = 0 THEN B.DATABASE_NAME ELSE SUBSTR(A.OBJECT_NAME, 1, INSTR(A.OBJECT_NAME, '.') -1) END AS VARCHAR2(128)) AS TABLE_OWNER, CAST(CASE WHEN INSTR(A.OBJECT_NAME, '@') = 0 THEN A.OBJECT_NAME ELSE SUBSTR(A.OBJECT_NAME, INSTR(A.OBJECT_NAME, '.') + 1, INSTR(A.OBJECT_NAME, '@') - INSTR(A.OBJECT_NAME, '.') -1) END AS VARCHAR2(128)) AS TABLE_NAME, CAST(CASE WHEN INSTR(A.OBJECT_NAME, '@') = 0 THEN NULL ELSE SUBSTR(A.OBJECT_NAME, INSTR(A.OBJECT_NAME, '@')+1) END AS VARCHAR2(128)) AS DB_LINK FROM (SELECT BB.DATABASE_NAME, AA.SYNONYM_NAME, AA.OBJECT_NAME, AA.SYNONYM_ID FROM SYS.ALL_VIRTUAL_SYNONYM_REAL_AGENT AA, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT BB WHERE AA.DATABASE_ID = BB.DATABASE_ID AND AA.TENANT_ID = BB.TENANT_ID AND AA.TENANT_ID = EFFECTIVE_TENANT_ID() AND (AA.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(13, AA.SYNONYM_ID, AA.DATABASE_ID) = 1)) A, (SELECT BB.DATABASE_NAME, AA.SYNONYM_ID FROM SYS.ALL_VIRTUAL_SYNONYM_REAL_AGENT AA, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT BB WHERE AA.OBJECT_DATABASE_ID = BB.DATABASE_ID AND AA.TENANT_ID = BB.TENANT_ID AND AA.TENANT_ID = EFFECTIVE_TENANT_ID() AND (AA.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(13, AA.SYNONYM_ID, AA.DATABASE_ID) = 1)) B WHERE A.SYNONYM_ID = B.SYNONYM_ID NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
......@@ -211,7 +211,7 @@ def SYS ALL_MVIEW_COMMENTS SELECT db.DATABASE_NAME AS OWNER, CAST(t.TABLE_N
def SYS ALL_METHOD_PARAMS SELECT CAST(NULL AS VARCHAR2(30)) AS OWNER, CAST(NULL AS VARCHAR2(30)) AS TYPE_NAME, CAST(NULL AS VARCHAR2(30)) AS METHOD_NAME, CAST(NULL AS NUMBER) AS METHOD_NO, CAST(NULL AS VARCHAR2(30)) AS PARAM_NAME, CAST(NULL AS NUMBER) AS PARAM_NO, CAST(NULL AS VARCHAR2(6)) AS PARAM_MODE, CAST(NULL AS VARCHAR2(7)) AS PARAM_TYPE_MOD, CAST(NULL AS VARCHAR2(30)) AS PARAM_TYPE_OWNER, CAST(NULL AS VARCHAR2(30)) AS PARAM_TYPE_NAME, CAST(NULL AS VARCHAR2(44)) AS CHARACTER_SET_NAME FROM DUAL WHERE 1 = 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_IND_SUBPARTITIONS SELECT CAST(B.INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(B.INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(PART.PART_NAME AS VARCHAR2(128)) AS PARTITION_NAME, CAST(SUB_PART.SUB_PART_NAME AS VARCHAR2(128)) AS SUBPARTITION_NAME, CAST(SUB_PART.HIGH_BOUND_VAL AS VARCHAR2(1024)) AS HIGH_VALUE, CAST(LENGTH(SUB_PART.HIGH_BOUND_VAL) AS NUMBER) AS HIGH_VALUE_LENGTH, SUB_PART.SUB_PART_ID + 1 AS SUBPARTITION_POSITION, CAST(NULL AS VARCHAR2(8)) AS STATUS, CAST(NULL AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENT, CAST(NULL AS NUMBER) AS MAX_EXTENT, CAST(NULL AS NUMBER) AS MAX_SIZE, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) AS LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS INTERVAL, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM( SELECT A.INDEX_OWNER AS INDEX_OWNER, A.INDEX_NAME AS INDEX_NAME, A.INDEX_TABLE_ID AS TABLE_ID, /*INDEX TABLE ID*/ A.DATA_TABLE_ID AS DATA_TABLE_ID, A.PART_LEVEL AS INDEX_TABLE_PART_LEVEL, TB2.PART_LEVEL AS DATA_TABLE_PART_LEVEL, /* CAST(CASE WHEN A.PART_LEVEL=2 THEN 'FALSE' ELSE 'TRUE' END AS VARCHAR2(5)) IS_LOCAL */ CAST('TRUE' AS VARCHAR2(5)) AS IS_LOCAL FROM( SELECT DB.DATABASE_NAME AS INDEX_OWNER, SUBSTR(TB1.TABLE_NAME, 7 + INSTR(SUBSTR(TB1.TABLE_NAME, 7), '_')) AS INDEX_NAME, TB1.TABLE_ID AS INDEX_TABLE_ID, TB1.DATA_TABLE_ID AS DATA_TABLE_ID, TB1.INDEX_TYPE AS INDEX_TYPE, TB1.PART_LEVEL AS PART_LEVEL /*USE DATA TABLE'S PART_LEVEL IF INDEX IS LOCAL INDEX*/ FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB1, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE DB.DATABASE_NAME!='__recyclebin' AND TB1.DATABASE_ID=DB.DATABASE_ID AND TB1.TABLE_TYPE=5 AND TB1.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() AND (TB1.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(1, TB1.DATA_TABLE_ID, TB1.DATABASE_ID) = 1) ) A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB2 ON A.DATA_TABLE_ID=TB2.TABLE_ID AND TB2.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE A.PART_LEVEL=2 OR ((A.INDEX_TYPE=1 OR A.INDEX_TYPE=2) AND TB2.PART_LEVEL=2) ) B, SYS.ALL_VIRTUAL_PART_REAL_AGENT PART, SYS.ALL_VIRTUAL_SUB_PART_REAL_AGENT SUB_PART WHERE ((B.IS_LOCAL='FALSE' AND B.TABLE_ID=PART.TABLE_ID AND PART.TABLE_ID=SUB_PART.TABLE_ID AND PART.PART_ID=SUB_PART.PART_ID) OR (B.IS_LOCAL='TRUE' AND B.DATA_TABLE_ID=PART.TABLE_ID AND PART.TABLE_ID=SUB_PART.TABLE_ID AND PART.PART_ID=SUB_PART.PART_ID)) AND SUB_PART.TENANT_ID = EFFECTIVE_TENANT_ID() AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_IND_PARTITIONS SELECT CAST(B.INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(B.INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(CASE WHEN PART.SUB_PART_NUM <=0 THEN 'NO' ELSE 'YES' END AS VARCHAR(3)) AS COMPOSITE, CAST(PART.PART_NAME AS VARCHAR2(128)) AS PARTITION_NAME, PART.SUB_PART_NUM AS SUBPARTITION_COUNT, CAST(PART.HIGH_BOUND_VAL AS VARCHAR2(1024)) AS HIGH_VALUE, CAST(LENGTH(PART.HIGH_BOUND_VAL) AS NUMBER) AS HIGH_VALUE_LENGTH, PART.PART_ID + 1 AS PARTITION_POSITION, CAST(NULL AS VARCHAR2(8)) AS STATUS, CAST(NULL AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENT, CAST(NULL AS NUMBER) AS MAX_EXTENT, CAST(NULL AS NUMBER) AS MAX_SIZE, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS VARCHAR2(7)) AS LOGGING, CAST(CASE WHEN PART.COMPRESS_FUNC_NAME IS NULL THEN 'DISABLED' ELSE 'ENABLED' END AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS INTERVAL, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM( SELECT A.INDEX_OWNER AS INDEX_OWNER, A.INDEX_NAME AS INDEX_NAME, A.INDEX_TABLE_ID AS TABLE_ID, /*INDEX TABLE ID*/ A.DATA_TABLE_ID AS DATA_TABLE_ID, CAST(CASE WHEN A.PART_LEVEL=1 THEN 'FALSE' ELSE 'TRUE' END AS VARCHAR2(5)) IS_LOCAL FROM( SELECT DB.DATABASE_NAME AS INDEX_OWNER, SUBSTR(TB1.TABLE_NAME, 7 + INSTR(SUBSTR(TB1.TABLE_NAME, 7), '_')) AS INDEX_NAME, TB1.TABLE_ID AS INDEX_TABLE_ID, TB1.DATA_TABLE_ID AS DATA_TABLE_ID, TB1.INDEX_TYPE AS INDEX_TYPE, TB1.PART_LEVEL AS PART_LEVEL /*USE DATA TABLE'S PART_LEVEL IF INDEX IS LOCAL INDEX*/ FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB1, SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT DB WHERE DB.DATABASE_NAME!='__recyclebin' AND TB1.DATABASE_ID=DB.DATABASE_ID AND TB1.TABLE_TYPE=5 AND TB1.TENANT_ID = EFFECTIVE_TENANT_ID() AND DB.TENANT_ID = EFFECTIVE_TENANT_ID() AND (TB1.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(1, TB1.DATA_TABLE_ID, TB1.DATABASE_ID) = 1) ) A JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT TB2 ON A.DATA_TABLE_ID=TB2.TABLE_ID AND TB2.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE A.PART_LEVEL=1 OR ((A.INDEX_TYPE=1 OR A.INDEX_TYPE=2) AND TB2.PART_LEVEL=1) ) B JOIN SYS.ALL_VIRTUAL_PART_REAL_AGENT PART ON ((B.TABLE_ID=PART.TABLE_ID AND B.IS_LOCAL='FALSE') OR (B.DATA_TABLE_ID=PART.TABLE_ID AND B.IS_LOCAL='TRUE')) AND PART.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_IND_EXPRESSIONS SELECT CAST(INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(H.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_EXPRESSION /* TODO: LONG */ AS VARCHAR2(1000)) AS COLUMN_EXPRESSION, COLUMN_POSITION FROM ( SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, F.CUR_DEFAULT_VALUE_V2 AS COLUMN_EXPRESSION, E.INDEX_POSITION AS COLUMN_POSITION, E.TABLE_ID AS TABLE_ID FROM (SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, C.TABLE_ID AS TABLE_ID, C.INDEX_ID AS INDEX_ID, D.COLUMN_ID AS COLUMN_ID, D.COLUMN_NAME AS COLUMN_NAME, D.INDEX_POSITION AS INDEX_POSITION FROM (SELECT DATABASE_NAME AS INDEX_OWNER, SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) AS INDEX_NAME, DATABASE_NAME AS TABLE_OWNER, A.DATA_TABLE_ID AS TABLE_ID, A.TABLE_ID AS INDEX_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() AND (A.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(1, A.DATA_TABLE_ID, A.DATABASE_ID) = 1) AND B.DATABASE_NAME != '__recyclebin' WHERE TABLE_TYPE=5 ) C JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT D ON C.INDEX_ID=D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID()) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON F.TABLE_ID=E.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() AND F.COLUMN_ID=E.COLUMN_ID AND F.COLUMN_FLAGS=1) G JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT H ON G.TABLE_ID=H.TABLE_ID AND H.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_IND_EXPRESSIONS SELECT CAST(INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(H.TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_EXPRESSION /* TODO: LONG */ AS VARCHAR2(1000)) AS COLUMN_EXPRESSION, COLUMN_POSITION FROM ( SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, F.CUR_DEFAULT_VALUE_V2 AS COLUMN_EXPRESSION, E.INDEX_POSITION AS COLUMN_POSITION, E.TABLE_ID AS TABLE_ID FROM (SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, C.TABLE_ID AS TABLE_ID, C.INDEX_ID AS INDEX_ID, D.COLUMN_ID AS COLUMN_ID, D.COLUMN_NAME AS COLUMN_NAME, D.INDEX_POSITION AS INDEX_POSITION FROM (SELECT DATABASE_NAME AS INDEX_OWNER, SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) AS INDEX_NAME, DATABASE_NAME AS TABLE_OWNER, A.DATA_TABLE_ID AS TABLE_ID, A.TABLE_ID AS INDEX_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() AND (A.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(1, A.DATA_TABLE_ID, A.DATABASE_ID) = 1) AND B.DATABASE_NAME != '__recyclebin' WHERE TABLE_TYPE=5 ) C JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT D ON C.INDEX_ID=D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() AND D.INDEX_POSITION != 0) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON F.TABLE_ID=E.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() AND F.COLUMN_ID=E.COLUMN_ID AND BITAND(F.COLUMN_FLAGS,3) > 0) G JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT H ON G.TABLE_ID=H.TABLE_ID AND H.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_IND_COLUMNS SELECT CAST(INDEX_OWNER AS VARCHAR2(128)) AS INDEX_OWNER, CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST(COLUMN_NAME AS VARCHAR2(4000)) AS COLUMN_NAME, CAST(ROWKEY_POSITION AS NUMBER) AS COLUMN_POSITION, CASE WHEN DATA_TYPE >= 1 AND DATA_TYPE <= 16 THEN CAST(22 AS NUMBER) WHEN DATA_TYPE = 17 THEN CAST(7 AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 2 THEN CAST(DATA_LENGTH AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 1 AND F.COLLATION_TYPE IN (45, 46, 224, 54, 55, 101) THEN CAST(DATA_LENGTH * 4 AS NUMBER) WHEN DATA_TYPE IN (22, 23) AND F.DATA_PRECISION = 1 AND F.COLLATION_TYPE IN (28, 87) THEN CAST(DATA_LENGTH * 2 AS NUMBER) WHEN DATA_TYPE = 36 THEN CAST(12 AS NUMBER) WHEN DATA_TYPE IN (37, 38) THEN CAST(11 AS NUMBER) WHEN DATA_TYPE = 39 THEN CAST(DATA_LENGTH AS NUMBER) WHEN DATA_TYPE = 40 THEN CAST(5 AS NUMBER) WHEN DATA_TYPE = 41 THEN CAST(11 AS NUMBER) ELSE CAST(0 AS NUMBER) END AS COLUMN_LENGTH, CASE WHEN DATA_TYPE IN (22, 23) THEN CAST(DATA_LENGTH AS NUMBER) ELSE CAST(0 AS NUMBER) END AS CHAR_LENGTH, CAST('ASC' AS VARCHAR2(4)) AS DESCEND FROM (SELECT INDEX_OWNER, INDEX_NAME, TABLE_OWNER, TABLE_NAME, INDEX_ID, IDX_TYPE FROM (SELECT DATABASE_NAME AS INDEX_OWNER, CASE WHEN (TABLE_TYPE = 5) THEN SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) ELSE (CONS_TAB.CONSTRAINT_NAME) END AS INDEX_NAME, DATABASE_NAME AS TABLE_OWNER, CASE WHEN (TABLE_TYPE = 3) THEN A.TABLE_ID ELSE A.DATA_TABLE_ID END AS TABLE_ID, A.TABLE_ID AS INDEX_ID, TABLE_TYPE AS IDX_TYPE FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND TABLE_TYPE IN (5, 3) AND B.DATABASE_NAME != '__recyclebin' AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() AND (A.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(1, DECODE(TABLE_TYPE, 3, TABLE_ID, 5, DATA_TABLE_ID), A.DATABASE_ID) = 1) LEFT JOIN SYS.ALL_VIRTUAL_CONSTRAINT_REAL_AGENT CONS_TAB ON (CONS_TAB.TABLE_ID = A.TABLE_ID AND CONS_TAB.TENANT_ID = EFFECTIVE_TENANT_ID()) WHERE NOT( TABLE_TYPE = 3 AND CONSTRAINT_NAME IS NULL ) ) C JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT D ON C.TABLE_ID = D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() ) E JOIN SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT F ON E.INDEX_ID = F.TABLE_ID AND F.TENANT_ID = EFFECTIVE_TENANT_ID() WHERE F.ROWKEY_POSITION != 0 AND (CASE WHEN IDX_TYPE = 5 THEN INDEX_POSITION ELSE 1 END) != 0 NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_INDEXES SELECT CAST(INDEX_OWNER AS VARCHAR2(128)) AS OWNER, CAST(INDEX_NAME AS VARCHAR2(128)) AS INDEX_NAME, CAST(INDEX_TYPE_NAME AS VARCHAR2(27)) AS INDEX_TYPE, CAST(TABLE_OWNER AS VARCHAR2(128)) AS TABLE_OWNER, CAST(TABLE_NAME AS VARCHAR2(128)) AS TABLE_NAME, CAST('TABLE' AS CHAR(5)) AS TABLE_TYPE, CAST(UNIQUENESS AS VARCHAR2(9)) AS UNIQUENESS, CAST(COMPRESSION AS VARCHAR2(8)) AS COMPRESSION, CAST(NULL AS NUMBER) AS PREFIX_LENGTH, CAST(TP.TABLESPACE_NAME AS VARCHAR2(30)) AS TABLESPACE_NAME, CAST(NULL AS NUMBER) AS INI_TRANS, CAST(NULL AS NUMBER) AS MAX_TRANS, CAST(NULL AS NUMBER) AS INITIAL_EXTENT, CAST(NULL AS NUMBER) AS NEXT_EXTENT, CAST(NULL AS NUMBER) AS MIN_EXTENTS, CAST(NULL AS NUMBER) AS MAX_EXTENTS, CAST(NULL AS NUMBER) AS PCT_INCREASE, CAST(NULL AS NUMBER) AS PCT_THRESHOLD, CAST(NULL AS NUMBER) AS INCLUDE_COLUMN, CAST(NULL AS NUMBER) AS FREELISTS, CAST(NULL AS NUMBER) AS FREELIST_GROUPS, CAST(NULL AS NUMBER) AS PCT_FREE, CAST(NULL AS VARCHAR2(3)) AS LOGGING, CAST(NULL AS NUMBER) AS BLEVEL, CAST(NULL AS NUMBER) AS LEAF_BLOCKS, CAST(NULL AS NUMBER) AS DISTINCT_KEYS, CAST(NULL AS NUMBER) AS AVG_LEAF_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS AVG_DATA_BLOCKS_PER_KEY, CAST(NULL AS NUMBER) AS CLUSTERING_FACTOR, CAST(STATUS AS VARCHAR2(10)) AS STATUS, CAST(NULL AS NUMBER) AS NUM_ROWS, CAST(NULL AS NUMBER) AS SAMPLE_SIZE, CAST(NULL AS DATE) AS LAST_ANALYZED, CAST(NULL AS VARCHAR2(40)) AS DEGREE, CAST(NULL AS VARCHAR2(40)) AS INSTANCES, CAST(CASE WHEN A_TABLE_TYPE = 3 THEN 'NO' WHEN A_INDEX_TYPE = 1 OR A_INDEX_TYPE = 2 THEN (CASE WHEN D.PART_LEVEL = 0 THEN 'NO' ELSE 'YES' END) ELSE (CASE WHEN A_PART_LEVEL = 0 THEN 'NO' ELSE 'YES' END) END AS VARCHAR2(3)) AS PARTITIONED, CAST(NULL AS VARCHAR2(1)) AS TEMPORARY, CAST(NULL AS VARCHAR2(1)) AS "GENERATED", CAST(NULL AS VARCHAR2(1)) AS SECONDARY, CAST(NULL AS VARCHAR2(7)) AS BUFFER_POOL, CAST(NULL AS VARCHAR2(7)) AS FLASH_CACHE, CAST(NULL AS VARCHAR2(7)) AS CELL_FLASH_CACHE, CAST(NULL AS VARCHAR2(3)) AS USER_STATS, CAST(NULL AS VARCHAR2(15)) AS DURATION, CAST(NULL AS NUMBER) AS PCT_DIRECT_ACCESS, CAST(NULL AS VARCHAR2(30)) AS ITYP_OWNER, CAST(NULL AS VARCHAR2(30)) AS ITYP_NAME, CAST(NULL AS VARCHAR2(1000)) AS PARAMETERS, CAST(NULL AS VARCHAR2(3)) AS GLOBAL_STATS, CAST(NULL AS VARCHAR2(12)) AS DOMIDX_STATUS, CAST(NULL AS VARCHAR2(6)) AS DOMIDX_OPSTATUS, CAST(FUNCIDX_STATUS AS VARCHAR2(8)) AS FUNCIDX_STATUS, CAST('NO' AS VARCHAR2(3)) AS JOIN_INDEX, CAST(NULL AS VARCHAR2(3)) AS IOT_REDUNDANT_PKEY_ELIM, CAST(DROPPED AS VARCHAR2(9)) AS DROPPED, CAST(VISIBILITY AS VARCHAR2(10)) AS VISIBILITY, CAST(NULL AS VARCHAR2(14)) AS DOMIDX_MANAGEMENT, CAST(NULL AS VARCHAR2(3)) AS SEGMENT_CREATED FROM (SELECT DATABASE_NAME AS INDEX_OWNER, CASE WHEN (TABLE_TYPE = 5 AND B.DATABASE_NAME != '__recyclebin') THEN SUBSTR(TABLE_NAME, 7 + INSTR(SUBSTR(TABLE_NAME, 7), '_')) WHEN (TABLE_TYPE = 5 AND B.DATABASE_NAME = '__recyclebin') THEN TABLE_NAME ELSE (CONS_TAB.CONSTRAINT_NAME) END AS INDEX_NAME, CASE WHEN A.TABLE_TYPE = 5 AND EXISTS ( SELECT 1 FROM SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT T_COL_INDEX, SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT T_COL_BASE WHERE T_COL_BASE.TABLE_ID = A.DATA_TABLE_ID AND T_COL_BASE.COLUMN_NAME = T_COL_INDEX.COLUMN_NAME AND T_COL_INDEX.TABLE_ID = A.TABLE_ID AND T_COL_BASE.TENANT_ID = A.TENANT_ID AND T_COL_INDEX.TENANT_ID = A.TENANT_ID AND BITAND(T_COL_BASE.COLUMN_FLAGS,3) > 0 ) THEN 'FUNCTION-BASED NORMAL' ELSE 'NORMAL' END AS INDEX_TYPE_NAME, DATABASE_NAME AS TABLE_OWNER, CASE WHEN (TABLE_TYPE = 3) THEN A.TABLE_ID ELSE A.DATA_TABLE_ID END AS TABLE_ID, A.TABLE_ID AS INDEX_ID, CASE WHEN TABLE_TYPE = 3 THEN 'UNIQUE' WHEN A.INDEX_TYPE IN (2, 4, 8) THEN 'UNIQUE' ELSE 'NONUNIQUE' END AS UNIQUENESS, CASE WHEN A.COMPRESS_FUNC_NAME = NULL THEN 'DISABLED' ELSE 'ENABLED' END AS COMPRESSION, CASE WHEN TABLE_TYPE = 3 THEN 'VALID' WHEN A.INDEX_STATUS = 2 THEN 'VALID' WHEN A.INDEX_STATUS = 3 THEN 'CHECKING' WHEN A.INDEX_STATUS = 4 THEN 'INELEGIBLE' WHEN A.INDEX_STATUS = 5 THEN 'ERROR' ELSE 'UNUSABLE' END AS STATUS, A.INDEX_TYPE AS A_INDEX_TYPE, A.PART_LEVEL AS A_PART_LEVEL, A.TABLE_TYPE AS A_TABLE_TYPE, CASE WHEN 0 = (SELECT COUNT(1) FROM SYS.ALL_VIRTUAL_COLUMN_REAL_AGENT WHERE TABLE_ID = A.TABLE_ID AND IS_HIDDEN = 0 AND TENANT_ID = EFFECTIVE_TENANT_ID()) THEN 'ENABLED' ELSE 'NULL' END AS FUNCIDX_STATUS, CASE WHEN B.DATABASE_NAME = '__recyclebin' THEN 'YES' ELSE 'NO' END AS DROPPED, CASE WHEN BITAND(A.INDEX_ATTRIBUTES_SET, 1) = 0 THEN 'VISIBLE' ELSE 'INVISIBLE' END AS VISIBILITY, A.TABLESPACE_ID FROM SYS.ALL_VIRTUAL_TABLE_REAL_AGENT A JOIN SYS.ALL_VIRTUAL_DATABASE_REAL_AGENT B ON A.DATABASE_ID = B.DATABASE_ID AND A.TENANT_ID = EFFECTIVE_TENANT_ID() AND B.TENANT_ID = EFFECTIVE_TENANT_ID() AND (A.DATABASE_ID = USERENV('SCHEMAID') OR USER_CAN_ACCESS_OBJ(1, DECODE(TABLE_TYPE, 3, A.TABLE_ID, 5, DATA_TABLE_ID), A.DATABASE_ID) = 1) AND TABLE_TYPE IN (5, 3) LEFT JOIN SYS.ALL_VIRTUAL_CONSTRAINT_REAL_AGENT CONS_TAB ON (CONS_TAB.TABLE_ID = A.TABLE_ID AND CONS_TAB.TENANT_ID = EFFECTIVE_TENANT_ID()) WHERE NOT(TABLE_TYPE = 3 AND CONSTRAINT_NAME IS NULL) AND (CONS_TAB.CONSTRAINT_TYPE IS NULL OR CONS_TAB.CONSTRAINT_TYPE = 1) ) C JOIN SYS.ALL_VIRTUAL_TABLE_REAL_AGENT D ON C.TABLE_ID = D.TABLE_ID AND D.TENANT_ID = EFFECTIVE_TENANT_ID() LEFT JOIN SYS.ALL_VIRTUAL_TENANT_TABLESPACE_REAL_AGENT TP ON C.TABLESPACE_ID = TP.TABLESPACE_ID AND TP.TENANT_ID = EFFECTIVE_TENANT_ID() NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
def SYS ALL_ERRORS SELECT CAST(o.owner AS VARCHAR2(128)) AS OWNER, CAST(o.object_name AS VARCHAR2(128)) AS NAME, CAST(o.object_type AS VARCHAR2(19)) AS TYPE, CAST(e.obj_seq AS NUMBER) AS SEQUENCE, CAST(e.line AS NUMBER) AS LINE, CAST(e.position AS NUMBER) AS POSITION, CAST(e.text as VARCHAR2(4000)) AS TEXT, CAST(DECODE(e.property, 0, 'ERROR', 1, 'WARNING', 'UNDEFINED') AS VARCHAR2(9)) AS ATTRIBUTE, CAST(e.error_number AS NUMBER) AS MESSAGE_NUMBER FROM all_objects o, (select obj_id, obj_seq, line, position, text, property, error_number, CAST( UPPER(decode(obj_type, 3, 'PACKAGE', 4, 'TYPE', 5, 'PACKAGE BODY', 6, 'TYPE BODY', 7, 'TRIGGER', 8, 'VIEW', 9, 'FUNCTION', 12, 'PROCEDURE', 'MAXTYPE')) AS VARCHAR2(23)) object_type from sys.ALL_VIRTUAL_TENANT_ERROR_REAL_AGENT WHERE TENANT_ID = EFFECTIVE_TENANT_ID()) e WHERE o.object_id = e.obj_id AND o.object_type like e.object_type AND o.object_type IN (UPPER('package'), UPPER('type'), UPPER('procedure'), UPPER('function'), UPPER('package body'), UPPER('view'), UPPER('trigger'), UPPER('type body'), UPPER('library'), UPPER('queue'), UPPER('java source'), UPPER('java class'), UPPER('dimension'), UPPER('assembly'), UPPER('hierarchy'), UPPER('arrtibute dimension'), UPPER('analytic view')) NONE NO NONE NONE utf8mb4 utf8mb4_general_ci
......@@ -447,7 +447,7 @@ SYS ALL_ARGUMENTS
SYS ALL_ALL_TABLES
show create view views;
View Create View character_set_client collation_connection
VIEWS CREATE VIEW `VIEWS` AS select /*+ READ_CONSISTENCY(WEAK) */ 'def' AS TABLE_CATALOG, d.database_name as TABLE_SCHEMA, t.table_name as TABLE_NAME, t.view_definition as VIEW_DEFINITION, 'NONE' as CHECK_OPTION, case t.view_is_updatable when 1 then 'YES' else 'NO' end as IS_UPDATABLE, 'NONE' as DEFINER, 'NONE' AS SECURITY_TYPE, case t.collation_type when 45 then 'utf8mb4' else 'NONE' end AS CHARACTER_SET_CLIENT, case t.collation_type when 45 then 'utf8mb4_general_ci' else 'NONE' end AS COLLATION_CONNECTION from oceanbase.__all_virtual_table as t join oceanbase.__all_virtual_database as d on t.tenant_id = effective_tenant_id() and d.tenant_id = effective_tenant_id() and t.database_id = d.database_id where (t.table_type = 1 or t.table_type = 4) and d.in_recyclebin = 0 and d.database_name != '__recyclebin' and d.database_name != 'information_schema' and d.database_name != 'oceanbase' utf8mb4 utf8mb4_general_ci
VIEWS CREATE VIEW `VIEWS` AS select /*+ READ_CONSISTENCY(WEAK) */ 'def' AS TABLE_CATALOG, d.database_name as TABLE_SCHEMA, t.table_name as TABLE_NAME, t.view_definition as VIEW_DEFINITION, 'NONE' as CHECK_OPTION, case t.view_is_updatable when 1 then 'YES' else 'NO' end as IS_UPDATABLE, 'NONE' as DEFINER, 'NONE' AS SECURITY_TYPE, case t.collation_type when 45 then 'utf8mb4' else 'NONE' end AS CHARACTER_SET_CLIENT, case t.collation_type when 45 then 'utf8mb4_general_ci' else 'NONE' end AS COLLATION_CONNECTION from oceanbase.__all_virtual_table as t join oceanbase.__all_virtual_database as d on t.tenant_id = effective_tenant_id() and d.tenant_id = effective_tenant_id() and t.database_id = d.database_id where (t.table_type = 1 or t.table_type = 4) and d.in_recyclebin = 0 and d.database_name != '__recyclebin' and d.database_name != 'information_schema' and d.database_name != 'oceanbase' and 0 = sys_privilege_check('table_acc', effective_tenant_id(), d.database_name, t.table_name) utf8mb4 utf8mb4_general_ci
desc views;
Field Type Null Key Default Extra
TABLE_CATALOG varchar(3) NO
......
......@@ -1793,12 +1793,12 @@ a
1
select !w, !!w, !(!w), ! !w, not w, not not w, w is true, w is not false, (not w) is false, not(w is false), if(w,'true','false'), !1+1, !'a', !false, !isnull('a'), !!isnull('a') from (select 0 w union select 1) w;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def !w !w 8 1 1 N 32897 0 63
def !!w !!w 8 1 1 N 32897 0 63
def !(!w) !(!w) 8 1 1 N 32897 0 63
def ! !w ! !w 8 1 1 N 32897 0 63
def not w not w 8 1 1 N 32897 0 63
def not not w not not w 8 1 1 N 32897 0 63
def !w !w 8 1 1 Y 32896 0 63
def !!w !!w 8 1 1 Y 32896 0 63
def !(!w) !(!w) 8 1 1 Y 32896 0 63
def ! !w ! !w 8 1 1 Y 32896 0 63
def not w not w 8 1 1 Y 32896 0 63
def not not w not not w 8 1 1 Y 32896 0 63
def w is true w is true 3 1 1 N 32897 0 63
def w is not false w is not false 3 1 1 N 32897 0 63
def (not w) is false (not w) is false 3 1 1 N 32897 0 63
......
......@@ -154,7 +154,7 @@ insert into t1 values('01-01-01'),('02-02-02'),('01-01-01'),('02-02-02');
set @bug28261='';
select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def if(@bug28261 = f1, '', @bug28261:= f1) if(@bug28261 = f1, '', @bug28261:= f1) 253 4194304 26 Y 0 31 45
def if(@bug28261 = f1, '', @bug28261:= f1) if(@bug28261 = f1, '', @bug28261:= f1) 253 104 26 Y 0 31 45
if(@bug28261 = f1, '', @bug28261:= f1)
2001-01-01 00:00:00.000000
2002-02-02 00:00:00.000000
......
......@@ -44,16 +44,22 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def str_to_date('1970-01-02','null') + 100 str_to_date('1970-01-02','null') + 100 8 11 0 Y 32896 0 63
str_to_date('1970-01-02','null') + 100
NULL
Warnings:
Warning 1411 Incorrect datetime value: '1970-01-02' for function str_to_date
select str_to_date('1970-01-02',0)+ 1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def str_to_date('1970-01-02',0)+ 1 str_to_date('1970-01-02',0)+ 1 246 21 0 Y 32896 0 63
str_to_date('1970-01-02',0)+ 1
NULL
Warnings:
Warning 1411 Incorrect datetime value: '1970-01-02' for function str_to_date
select str_to_date('1970-01-02', 23) +10;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def str_to_date('1970-01-02', 23) +10 str_to_date('1970-01-02', 23) +10 246 21 0 Y 32896 0 63
str_to_date('1970-01-02', 23) +10
NULL
Warnings:
Warning 1411 Incorrect datetime value: '1970-01-02' for function str_to_date
select str_to_date('1970-01-02 12:23:32','%Y-%m-%d %H:%i:%s')+ 10000;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def str_to_date('1970-01-02 12:23:32','%Y-%m-%d %H:%i:%s')+ 10000 str_to_date('1970-01-02 12:23:32','%Y-%m-%d %H:%i:%s')+ 10000 246 21 14 Y 32896 0 63
......@@ -74,6 +80,8 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def str_to_date('12:23:32',10)+ 10000 str_to_date('12:23:32',10)+ 10000 246 21 0 Y 32896 0 63
str_to_date('12:23:32',10)+ 10000
NULL
Warnings:
Warning 1411 Incorrect datetime value: '12:23:32' for function str_to_date
drop table if exists t1, t2, t3, t3k;
CREATE TABLE t1 (EMPNUM INT);
INSERT INTO t1 VALUES (0), (2);
......
......@@ -11,7 +11,6 @@ create table nn2(d1 int, d2 int, d3 varchar(10));
create table t1(a int, b int, c int);
create table t2(a int, b int, c int);
create table t3(a int, b int, c int);
### 1, 基本测试 ###
select /*+ leading(c, (b , a) ) */ count(*),sum(a.c1+b.d2*a.c2) from nn1 a join nn2 b on a.c1 = b.d2 join nn1 c on b.d1 = c.c1 where a.c2 < 5 ;
count(*) sum(a.c1+b.d2*a.c2)
0 NULL
......@@ -79,7 +78,6 @@ from nn1 t1, nn2 t2, nn1 t3
where t1.c1 = t2.d1 and t1.c2 = t3.c1 and t1.c1 =t3.c1+t2.d2;
count(*) sum(t2.d1+t3.c2)
0 NULL
### 3, 复杂测试(集合、子查询中等) ###
SELECT count(*), sum(b.d1) from
nn1 a, nn2 b, nn1 c
WHERE
......@@ -142,7 +140,6 @@ select /* leading(t3 (t2 t1)) */ sum(t1.c1) from nn1 t1 , nn1 t2 , nn1 t3 where
and t3.c1 in (1,2);
sum(t1.c1)
NULL
### 4, 错误、无效或冗余的指定测试 ###
select /*+ leading((d, c), b , a) */ count(*), sum(b.d1+d.d2) from nn1 a, nn2 b, nn1 c, nn2 d
where a.c1 = b.d1 and c.c2 = d.d1;
count(*) sum(b.d1+d.d2)
......@@ -171,7 +168,6 @@ nn1 t3 on t3.c2 IN(1,23,4,2,5,6) join nn1 t4 on t3.c1=t4.c1 join nn1 t5 on t4.c2
join nn1 t6 on t5.c1 = t6.c2 left join nn1 t7 on t1.c1=t7.c1;
count(*) sum(t2.c2+t3.c1)
0 NULL
### 6, 嵌套hint和hint的print测试 ###
select /*+ leading(c, (a ,(d, b)) ) */ count(a.c1+b.d2) , sum(b.d2+b.d2*a.c1) from nn1 a join nn2 b on a.c1 = b.d2
join nn1 c on b.d1 = c.c1 join nn1 d on d.c2 = c.c2 where a.c2 < 5 and d.c1 = b.d2
and d.c2 = a.c1 ;
......@@ -180,17 +176,17 @@ count(a.c1+b.d2) sum(b.d2+b.d2*a.c1)
create view v1 as select /*+ leading(c, b , a ) use_hash(b a) */ a.c1 as a_c1, a.c2 as a_c2, a.c3 as a_c3, b.d1, b.d2, b.d3, c.c1 as c_c1, c.c2 as c_c2, c.c3 as c_c3 from nn1 a join nn2 b on a.c1 = b.d2 join nn1 c on b.d1 = c.c1 where a.c2 < 5;
show create view v1;
View Create View character_set_client collation_connection
v1 CREATE VIEW `v1` AS select /*+ LEADING(c b a) USE_HASH((b) (a)) */`bushy_leading_hint_db`.`a`.`c1` AS `a_c1`,`bushy_leading_hint_db`.`a`.`c2` AS `a_c2`,`bushy_leading_hint_db`.`a`.`c3` AS `a_c3`,`bushy_leading_hint_db`.`b`.`d1` AS `d1`,`bushy_leading_hint_db`.`b`.`d2` AS `d2`,`bushy_leading_hint_db`.`b`.`d3` AS `d3`,`bushy_leading_hint_db`.`c`.`c1` AS `c_c1`,`bushy_leading_hint_db`.`c`.`c2` AS `c_c2`,`bushy_leading_hint_db`.`c`.`c3` AS `c_c3` from ((`bushy_leading_hint_db`.`nn1` `a` join `bushy_leading_hint_db`.`nn2` `b` on ((`bushy_leading_hint_db`.`a`.`c1` = `bushy_leading_hint_db`.`b`.`d2`))) join `bushy_leading_hint_db`.`nn1` `c` on ((`bushy_leading_hint_db`.`b`.`d1` = `bushy_leading_hint_db`.`c`.`c1`))) where (`bushy_leading_hint_db`.`a`.`c2` < 5) utf8mb4 utf8mb4_general_ci
v1 CREATE VIEW `v1` AS select /*+ LEADING(c b a) USE_HASH((b) (a)) */`a`.`c1` AS `a_c1`,`a`.`c2` AS `a_c2`,`a`.`c3` AS `a_c3`,`b`.`d1` AS `d1`,`b`.`d2` AS `d2`,`b`.`d3` AS `d3`,`c`.`c1` AS `c_c1`,`c`.`c2` AS `c_c2`,`c`.`c3` AS `c_c3` from ((`bushy_leading_hint_db`.`nn1` `a` join `bushy_leading_hint_db`.`nn2` `b` on ((`a`.`c1` = `b`.`d2`))) join `bushy_leading_hint_db`.`nn1` `c` on ((`b`.`d1` = `c`.`c1`))) where (`a`.`c2` < 5) utf8mb4 utf8mb4_general_ci
create view v2 as select /*+ leading(c, (b , a)) */ a.c1 as a_c1, a.c2 as a_c2, a.c3 as a_c3, b.d1, b.d2, b.d3, c.c1 as c_c1, c.c2 as c_c2, c.c3 as c_c3 from nn1 a join nn2 b on a.c1 = b.d2 join nn1 c on b.d1 = c.c1 where a.c2 < 5 ;
show create view v2;
View Create View character_set_client collation_connection
v2 CREATE VIEW `v2` AS select /*+ LEADING(c (b a)) */`bushy_leading_hint_db`.`a`.`c1` AS `a_c1`,`bushy_leading_hint_db`.`a`.`c2` AS `a_c2`,`bushy_leading_hint_db`.`a`.`c3` AS `a_c3`,`bushy_leading_hint_db`.`b`.`d1` AS `d1`,`bushy_leading_hint_db`.`b`.`d2` AS `d2`,`bushy_leading_hint_db`.`b`.`d3` AS `d3`,`bushy_leading_hint_db`.`c`.`c1` AS `c_c1`,`bushy_leading_hint_db`.`c`.`c2` AS `c_c2`,`bushy_leading_hint_db`.`c`.`c3` AS `c_c3` from ((`bushy_leading_hint_db`.`nn1` `a` join `bushy_leading_hint_db`.`nn2` `b` on ((`bushy_leading_hint_db`.`a`.`c1` = `bushy_leading_hint_db`.`b`.`d2`))) join `bushy_leading_hint_db`.`nn1` `c` on ((`bushy_leading_hint_db`.`b`.`d1` = `bushy_leading_hint_db`.`c`.`c1`))) where (`bushy_leading_hint_db`.`a`.`c2` < 5) utf8mb4 utf8mb4_general_ci
v2 CREATE VIEW `v2` AS select /*+ LEADING(c (b a)) */`a`.`c1` AS `a_c1`,`a`.`c2` AS `a_c2`,`a`.`c3` AS `a_c3`,`b`.`d1` AS `d1`,`b`.`d2` AS `d2`,`b`.`d3` AS `d3`,`c`.`c1` AS `c_c1`,`c`.`c2` AS `c_c2`,`c`.`c3` AS `c_c3` from ((`bushy_leading_hint_db`.`nn1` `a` join `bushy_leading_hint_db`.`nn2` `b` on ((`a`.`c1` = `b`.`d2`))) join `bushy_leading_hint_db`.`nn1` `c` on ((`b`.`d1` = `c`.`c1`))) where (`a`.`c2` < 5) utf8mb4 utf8mb4_general_ci
create view v3 as select /*+ leading(c, (d, (a,b))) */ a.c1 as a_c1, a.c2 as a_c2, a.c3 as a_c3, b.d1, b.d2, b.d3, c.c1 as c_c1, c.c2 as c_c2, c.c3 as c_c3 from nn1 a join nn2 b
on a.c1 = b.d2
join nn1 c on b.d1 = c.c1 join nn1 d on d.c2 = c.c2 where a.c2 < 5 ;
show create view v3;
View Create View character_set_client collation_connection
v3 CREATE VIEW `v3` AS select /*+ LEADING(c (d (a b))) */`bushy_leading_hint_db`.`a`.`c1` AS `a_c1`,`bushy_leading_hint_db`.`a`.`c2` AS `a_c2`,`bushy_leading_hint_db`.`a`.`c3` AS `a_c3`,`bushy_leading_hint_db`.`b`.`d1` AS `d1`,`bushy_leading_hint_db`.`b`.`d2` AS `d2`,`bushy_leading_hint_db`.`b`.`d3` AS `d3`,`bushy_leading_hint_db`.`c`.`c1` AS `c_c1`,`bushy_leading_hint_db`.`c`.`c2` AS `c_c2`,`bushy_leading_hint_db`.`c`.`c3` AS `c_c3` from (((`bushy_leading_hint_db`.`nn1` `a` join `bushy_leading_hint_db`.`nn2` `b` on ((`bushy_leading_hint_db`.`a`.`c1` = `bushy_leading_hint_db`.`b`.`d2`))) join `bushy_leading_hint_db`.`nn1` `c` on ((`bushy_leading_hint_db`.`b`.`d1` = `bushy_leading_hint_db`.`c`.`c1`))) join `bushy_leading_hint_db`.`nn1` `d` on ((`bushy_leading_hint_db`.`d`.`c2` = `bushy_leading_hint_db`.`c`.`c2`))) where (`bushy_leading_hint_db`.`a`.`c2` < 5) utf8mb4 utf8mb4_general_ci
v3 CREATE VIEW `v3` AS select /*+ LEADING(c (d (a b))) */`a`.`c1` AS `a_c1`,`a`.`c2` AS `a_c2`,`a`.`c3` AS `a_c3`,`b`.`d1` AS `d1`,`b`.`d2` AS `d2`,`b`.`d3` AS `d3`,`c`.`c1` AS `c_c1`,`c`.`c2` AS `c_c2`,`c`.`c3` AS `c_c3` from (((`bushy_leading_hint_db`.`nn1` `a` join `bushy_leading_hint_db`.`nn2` `b` on ((`a`.`c1` = `b`.`d2`))) join `bushy_leading_hint_db`.`nn1` `c` on ((`b`.`d1` = `c`.`c1`))) join `bushy_leading_hint_db`.`nn1` `d` on ((`d`.`c2` = `c`.`c2`))) where (`a`.`c2` < 5) utf8mb4 utf8mb4_general_ci
create view v4 as
select /*+ leading(t2, (t1, t3), (t7, (t8, t9)), (t4, t5, t6)) */
t1.c1 as x, t3.c2 as y, t5.c2 as z from nn1 t1, nn1 t2, nn1 t3, nn1 t4, nn1 t5, nn1 t6 , nn1 t7, nn1 t8, nn1 t9
......@@ -198,7 +194,7 @@ where t1.c1 = t2.c1 and t1.c1=t3.c2 and t2.c1 = t3.c1 and t3.c1 = t4.c1 and t4.c
t6.c1 = t7.c1 and t7.c1 = t8.c1 and t8.c1 = t9.c1 and t8.c1 = t2.c1 and t1.c1 = t9.c1;
show create view v4;
View Create View character_set_client collation_connection
v4 CREATE VIEW `v4` AS select /*+ LEADING(t2 (t1 t3) (t7 (t8 t9)) (t4 t5 t6)) */`bushy_leading_hint_db`.`t1`.`c1` AS `x`,`bushy_leading_hint_db`.`t3`.`c2` AS `y`,`bushy_leading_hint_db`.`t5`.`c2` AS `z` from `bushy_leading_hint_db`.`nn1` `t1`,`bushy_leading_hint_db`.`nn1` `t2`,`bushy_leading_hint_db`.`nn1` `t3`,`bushy_leading_hint_db`.`nn1` `t4`,`bushy_leading_hint_db`.`nn1` `t5`,`bushy_leading_hint_db`.`nn1` `t6`,`bushy_leading_hint_db`.`nn1` `t7`,`bushy_leading_hint_db`.`nn1` `t8`,`bushy_leading_hint_db`.`nn1` `t9` where (`bushy_leading_hint_db`.`t1`.`c1` = `bushy_leading_hint_db`.`t2`.`c1`) and (`bushy_leading_hint_db`.`t1`.`c1` = `bushy_leading_hint_db`.`t3`.`c2`) and (`bushy_leading_hint_db`.`t2`.`c1` = `bushy_leading_hint_db`.`t3`.`c1`) and (`bushy_leading_hint_db`.`t3`.`c1` = `bushy_leading_hint_db`.`t4`.`c1`) and (`bushy_leading_hint_db`.`t4`.`c1` = `bushy_leading_hint_db`.`t5`.`c1`) and (`bushy_leading_hint_db`.`t5`.`c1` = `bushy_leading_hint_db`.`t6`.`c1`) and (`bushy_leading_hint_db`.`t6`.`c1` = `bushy_leading_hint_db`.`t7`.`c1`) and (`bushy_leading_hint_db`.`t7`.`c1` = `bushy_leading_hint_db`.`t8`.`c1`) and (`bushy_leading_hint_db`.`t8`.`c1` = `bushy_leading_hint_db`.`t9`.`c1`) and (`bushy_leading_hint_db`.`t8`.`c1` = `bushy_leading_hint_db`.`t2`.`c1`) and (`bushy_leading_hint_db`.`t1`.`c1` = `bushy_leading_hint_db`.`t9`.`c1`) utf8mb4 utf8mb4_general_ci
v4 CREATE VIEW `v4` AS select /*+ LEADING(t2 (t1 t3) (t7 (t8 t9)) (t4 t5 t6)) */`t1`.`c1` AS `x`,`t3`.`c2` AS `y`,`t5`.`c2` AS `z` from `bushy_leading_hint_db`.`nn1` `t1`,`bushy_leading_hint_db`.`nn1` `t2`,`bushy_leading_hint_db`.`nn1` `t3`,`bushy_leading_hint_db`.`nn1` `t4`,`bushy_leading_hint_db`.`nn1` `t5`,`bushy_leading_hint_db`.`nn1` `t6`,`bushy_leading_hint_db`.`nn1` `t7`,`bushy_leading_hint_db`.`nn1` `t8`,`bushy_leading_hint_db`.`nn1` `t9` where (`t1`.`c1` = `t2`.`c1`) and (`t1`.`c1` = `t3`.`c2`) and (`t2`.`c1` = `t3`.`c1`) and (`t3`.`c1` = `t4`.`c1`) and (`t4`.`c1` = `t5`.`c1`) and (`t5`.`c1` = `t6`.`c1`) and (`t6`.`c1` = `t7`.`c1`) and (`t7`.`c1` = `t8`.`c1`) and (`t8`.`c1` = `t9`.`c1`) and (`t8`.`c1` = `t2`.`c1`) and (`t1`.`c1` = `t9`.`c1`) utf8mb4 utf8mb4_general_ci
select count(*), sum(x+y-z*4) from v4;
count(*) sum(x+y-z*4)
0 NULL
......@@ -237,7 +233,6 @@ count(*), sum(t1.c1)-sum(t4.c2) from nn1 t1, nn1 t2, nn1 t3, nn1 t4
where t1.c1 = t2.c1 and t3.c1 = t4.c1 and t1.c2 = t3.c2;
count(*) sum(t1.c1)-sum(t4.c2)
0 NULL
### 7, 带qb_name的测试 ###
select /*+ LEADING(@x2x (c d), (a b)) */
* from nn1 x
where exists (select /*+ qb_name(x2x) */ 1
......@@ -256,7 +251,6 @@ where exists (select /*+ qb_name(x3x) */ 1
from nn1 a, nn2 b, nn1 c, nn2 d where a.c1 = b.d1
and c.c2 = d.d1) order by x.c1 desc, x.c3 desc, x.c2 asc ;
c1 c2 c3
### 8, 通过bushy 扩展能获取较好的计划 ###
select /*+ leading(t1,t2,(t4,t5))*/ count(*),min(t2.c1)+max(t5.d2) from nn1 t1, nn1 t2, nn2 t4, nn2 t5
where t1.c1 = t2.c1 and
t4.d1 = t5.d1 AND
......
......@@ -7151,32 +7151,34 @@ Outputs & filters:
explain select * from (select a from t1 intersect select a from t2 intersect select b from t3) as t4, t1 as t5 where t4.a = t5.a;
Query Plan
========================================================================
|ID|OPERATOR |NAME |EST. ROWS |COST |
------------------------------------------------------------------------
|0 |PX COORDINATOR | |2450250000|1921660442|
|1 | EXCHANGE OUT DISTR |:EX10003|2450250000|1457778786|
|2 | MERGE JOIN | |2450250000|1457778786|
|3 | EXCHANGE IN DISTR | |500000 |2864053 |
|4 | EXCHANGE OUT DISTR (PKEY) |:EX10002|500000 |2840388 |
|5 | MATERIAL | |500000 |2840388 |
|6 | SUBPLAN SCAN |t4 |500000 |2748511 |
|7 | MERGE INTERSECT DISTINCT | |500000 |2679500 |
|8 | EXCHANGE IN MERGE SORT DISTR| |500000 |902213 |
|9 | EXCHANGE OUT DISTR |:EX10000|500000 |878548 |
|10| PX PARTITION ITERATOR | |500000 |878548 |
|11| MERGE INTERSECT DISTINCT | |500000 |878548 |
|12| TABLE SCAN |t1 |500000 |309262 |
|13| TABLE SCAN |t2 |500000 |309262 |
|14| EXCHANGE IN MERGE SORT DISTR| |500000 |1517265 |
|15| EXCHANGE OUT DISTR |:EX10001|500000 |1469935 |
|16| SORT | |500000 |1469935 |
|17| PX PARTITION ITERATOR | |500000 |320292 |
|18| TABLE SCAN |t3 |500000 |320292 |
|19| SORT | |500000 |1578063 |
|20| PX PARTITION ITERATOR | |500000 |331321 |
|21| TABLE SCAN |t5 |500000 |331321 |
========================================================================
=========================================================================
|ID|OPERATOR |NAME |EST. ROWS |COST |
-------------------------------------------------------------------------
|0 |PX COORDINATOR | |2450250000|1922804863|
|1 | EXCHANGE OUT DISTR |:EX10003|2450250000|1458923207|
|2 | MERGE JOIN | |2450250000|1458923207|
|3 | EXCHANGE IN DISTR | |500000 |4008474 |
|4 | EXCHANGE OUT DISTR (PKEY) |:EX10002|500000 |3984809 |
|5 | MATERIAL | |500000 |3984809 |
|6 | SUBPLAN SCAN |t4 |500000 |3892932 |
|7 | MERGE INTERSECT DISTINCT | |500000 |3823921 |
|8 | MATERIAL | |500000 |2046634 |
|9 | EXCHANGE IN MERGE SORT DISTR| |500000 |1954757 |
|10| EXCHANGE OUT DISTR |:EX10000|500000 |1931092 |
|11| SORT | |500000 |1931092 |
|12| PX PARTITION ITERATOR | |500000 |878548 |
|13| MERGE INTERSECT DISTINCT| |500000 |878548 |
|14| TABLE SCAN |t1 |500000 |309262 |
|15| TABLE SCAN |t2 |500000 |309262 |
|16| EXCHANGE IN MERGE SORT DISTR | |500000 |1517265 |
|17| EXCHANGE OUT DISTR |:EX10001|500000 |1469935 |
|18| SORT | |500000 |1469935 |
|19| PX PARTITION ITERATOR | |500000 |320292 |
|20| TABLE SCAN |t3 |500000 |320292 |
|21| SORT | |500000 |1578063 |
|22| PX PARTITION ITERATOR | |500000 |331321 |
|23| TABLE SCAN |t5 |500000 |331321 |
=========================================================================
Outputs & filters:
-------------------------------------
......@@ -7190,23 +7192,25 @@ Outputs & filters:
6 - output([t4.a]), filter(nil),
access([t4.a])
7 - output([INTERSECT([1])]), filter(nil)
8 - output([INTERSECT([1])]), filter(nil), sort_keys([INTERSECT([1]), ASC]), Local Order
9 - output([INTERSECT([1])]), filter(nil), dop=1
10 - output([INTERSECT([1])]), filter(nil)
11 - output([INTERSECT([1])]), filter(nil)
12 - output([t1.a]), filter(nil),
8 - output([INTERSECT([1])]), filter(nil)
9 - output([INTERSECT([1])]), filter(nil), sort_keys([INTERSECT([1]), ASC])
10 - output([INTERSECT([1])]), filter(nil), dop=1
11 - output([INTERSECT([1])]), filter(nil), sort_keys([INTERSECT([1]), ASC]), local merge sort
12 - output([INTERSECT([1])]), filter(nil)
13 - output([INTERSECT([1])]), filter(nil)
14 - output([t1.a]), filter(nil),
access([t1.a]), partitions(p[0-4])
13 - output([t2.a]), filter(nil),
15 - output([t2.a]), filter(nil),
access([t2.a]), partitions(p[0-4])
14 - output([t3.b]), filter(nil), sort_keys([t3.b, ASC])
15 - output([t3.b]), filter(nil), dop=1
16 - output([t3.b]), filter(nil), sort_keys([t3.b, ASC])
17 - output([t3.b]), filter(nil)
18 - output([t3.b]), filter(nil),
17 - output([t3.b]), filter(nil), dop=1
18 - output([t3.b]), filter(nil), sort_keys([t3.b, ASC])
19 - output([t3.b]), filter(nil)
20 - output([t3.b]), filter(nil),
access([t3.b]), partitions(p[0-4])
19 - output([t5.a], [t5.b], [t5.c]), filter(nil), sort_keys([t5.a, ASC]), local merge sort
20 - output([t5.a], [t5.b], [t5.c]), filter(nil)
21 - output([t5.a], [t5.b], [t5.c]), filter(nil),
21 - output([t5.a], [t5.b], [t5.c]), filter(nil), sort_keys([t5.a, ASC]), local merge sort
22 - output([t5.a], [t5.b], [t5.c]), filter(nil)
23 - output([t5.a], [t5.b], [t5.c]), filter(nil),
access([t5.a], [t5.b], [t5.c]), partitions(p[0-4])
explain select * from (select a from t1 intersect select 1 a intersect select b from t3) as t4, t1 as t5 where t4.a = t5.a;
......@@ -7327,26 +7331,28 @@ Outputs & filters:
explain select * from (select a from t1 intersect select a from t2 intersect select 1 a) as t3, t1 as t4 where t3.a = t4.a;
Query Plan
===================================================================
|ID|OPERATOR |NAME |EST. ROWS|COST |
-------------------------------------------------------------------
|0 |PX COORDINATOR | |4950 |1005162|
|1 | EXCHANGE OUT DISTR |:EX10002|4950 |1004225|
|2 | NESTED-LOOP JOIN | |4950 |1004225|
|3 | EXCHANGE IN DISTR | |1 |997719 |
|4 | EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |997719 |
|5 | SUBPLAN SCAN |t3 |1 |997719 |
|6 | MERGE INTERSECT DISTINCT | |1 |997719 |
|7 | EXCHANGE IN MERGE SORT DISTR| |500000 |902213 |
|8 | EXCHANGE OUT DISTR |:EX10000|500000 |878548 |
|9 | PX PARTITION ITERATOR | |500000 |878548 |
|10| MERGE INTERSECT DISTINCT | |500000 |878548 |
|11| TABLE SCAN |t1 |500000 |309262 |
|12| TABLE SCAN |t2 |500000 |309262 |
|13| EXPRESSION | |1 |1 |
|14| PX PARTITION ITERATOR | |4950 |3301 |
|15| TABLE SCAN |t4 |4950 |3301 |
===================================================================
====================================================================
|ID|OPERATOR |NAME |EST. ROWS|COST |
--------------------------------------------------------------------
|0 |PX COORDINATOR | |4950 |2057706|
|1 | EXCHANGE OUT DISTR |:EX10002|4950 |2056769|
|2 | NESTED-LOOP JOIN | |4950 |2056769|
|3 | EXCHANGE IN DISTR | |1 |2050264|
|4 | EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |2050264|
|5 | MATERIAL | |1 |2050264|
|6 | SUBPLAN SCAN |t3 |1 |2050264|
|7 | MERGE INTERSECT DISTINCT | |1 |2050263|
|8 | EXCHANGE IN MERGE SORT DISTR| |500000 |1954757|
|9 | EXCHANGE OUT DISTR |:EX10000|500000 |1931092|
|10| SORT | |500000 |1931092|
|11| PX PARTITION ITERATOR | |500000 |878548 |
|12| MERGE INTERSECT DISTINCT| |500000 |878548 |
|13| TABLE SCAN |t1 |500000 |309262 |
|14| TABLE SCAN |t2 |500000 |309262 |
|15| EXPRESSION | |1 |1 |
|16| PX PARTITION ITERATOR | |4950 |3301 |
|17| TABLE SCAN |t4 |4950 |3301 |
====================================================================
Outputs & filters:
-------------------------------------
......@@ -7356,21 +7362,23 @@ Outputs & filters:
conds(nil), nl_params_([t3.a])
3 - output([t3.a], [PARTITION_ID]), filter(nil)
4 - (#keys=1, [t3.a]), output([t3.a], [PARTITION_ID]), filter(nil), is_single, dop=1
5 - output([t3.a]), filter(nil),
5 - output([t3.a]), filter(nil)
6 - output([t3.a]), filter(nil),
access([t3.a])
6 - output([INTERSECT([1])]), filter(nil)
7 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil), sort_keys([cast(INTERSECT([1]), BIGINT(20, 0)), ASC]), Local Order
8 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil), dop=1
9 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil)
10 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil)
11 - output([t1.a]), filter(nil),
7 - output([INTERSECT([1])]), filter(nil)
8 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil), sort_keys([cast(INTERSECT([1]), BIGINT(20, 0)), ASC])
9 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil), dop=1
10 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil), sort_keys([cast(INTERSECT([1]), BIGINT(20, 0)), ASC]), local merge sort
11 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil)
12 - output([cast(INTERSECT([1]), BIGINT(20, 0))]), filter(nil)
13 - output([t1.a]), filter(nil),
access([t1.a]), partitions(p[0-4])
12 - output([t2.a]), filter(nil),
14 - output([t2.a]), filter(nil),
access([t2.a]), partitions(p[0-4])
13 - output([1]), filter(nil)
15 - output([1]), filter(nil)
values({1})
14 - output([t4.a], [t4.b], [t4.c]), filter(nil)
15 - output([t4.a], [t4.b], [t4.c]), filter(nil),
16 - output([t4.a], [t4.b], [t4.c]), filter(nil)
17 - output([t4.a], [t4.b], [t4.c]), filter(nil),
access([t4.a], [t4.b], [t4.c]), partitions(p[0-4])
explain select * from (select t2.a from t1, t2 where t1.a = t2.a intersect select a from t1 as t3) as t4, t2 as t5 where t4.a = t5.a;
......@@ -7810,32 +7818,34 @@ Outputs & filters:
explain select * from (select a from t1 except select a from t2 except select b from t3) as t4, t1 as t5 where t4.a = t5.a;
Query Plan
========================================================================
|ID|OPERATOR |NAME |EST. ROWS |COST |
------------------------------------------------------------------------
|0 |PX COORDINATOR | |2450250000|1921660442|
|1 | EXCHANGE OUT DISTR |:EX10003|2450250000|1457778786|
|2 | MERGE JOIN | |2450250000|1457778786|
|3 | EXCHANGE IN DISTR | |500000 |2864053 |
|4 | EXCHANGE OUT DISTR (PKEY) |:EX10002|500000 |2840388 |
|5 | MATERIAL | |500000 |2840388 |
|6 | SUBPLAN SCAN |t4 |500000 |2748511 |
|7 | MERGE EXCEPT DISTINCT | |500000 |2679500 |
|8 | EXCHANGE IN MERGE SORT DISTR| |500000 |902213 |
|9 | EXCHANGE OUT DISTR |:EX10000|500000 |878548 |
|10| PX PARTITION ITERATOR | |500000 |878548 |
|11| MERGE EXCEPT DISTINCT | |500000 |878548 |
|12| TABLE SCAN |t1 |500000 |309262 |
|13| TABLE SCAN |t2 |500000 |309262 |
|14| EXCHANGE IN MERGE SORT DISTR| |500000 |1517265 |
|15| EXCHANGE OUT DISTR |:EX10001|500000 |1469935 |
|16| SORT | |500000 |1469935 |
|17| PX PARTITION ITERATOR | |500000 |320292 |
|18| TABLE SCAN |t3 |500000 |320292 |
|19| SORT | |500000 |1578063 |
|20| PX PARTITION ITERATOR | |500000 |331321 |
|21| TABLE SCAN |t5 |500000 |331321 |
========================================================================
=========================================================================
|ID|OPERATOR |NAME |EST. ROWS |COST |
-------------------------------------------------------------------------
|0 |PX COORDINATOR | |2450250000|1922804863|
|1 | EXCHANGE OUT DISTR |:EX10003|2450250000|1458923207|
|2 | MERGE JOIN | |2450250000|1458923207|
|3 | EXCHANGE IN DISTR | |500000 |4008474 |
|4 | EXCHANGE OUT DISTR (PKEY) |:EX10002|500000 |3984809 |
|5 | MATERIAL | |500000 |3984809 |
|6 | SUBPLAN SCAN |t4 |500000 |3892932 |
|7 | MERGE EXCEPT DISTINCT | |500000 |3823921 |
|8 | MATERIAL | |500000 |2046634 |
|9 | EXCHANGE IN MERGE SORT DISTR| |500000 |1954757 |
|10| EXCHANGE OUT DISTR |:EX10000|500000 |1931092 |
|11| SORT | |500000 |1931092 |
|12| PX PARTITION ITERATOR | |500000 |878548 |
|13| MERGE EXCEPT DISTINCT | |500000 |878548 |
|14| TABLE SCAN |t1 |500000 |309262 |
|15| TABLE SCAN |t2 |500000 |309262 |
|16| EXCHANGE IN MERGE SORT DISTR | |500000 |1517265 |
|17| EXCHANGE OUT DISTR |:EX10001|500000 |1469935 |
|18| SORT | |500000 |1469935 |
|19| PX PARTITION ITERATOR | |500000 |320292 |
|20| TABLE SCAN |t3 |500000 |320292 |
|21| SORT | |500000 |1578063 |
|22| PX PARTITION ITERATOR | |500000 |331321 |
|23| TABLE SCAN |t5 |500000 |331321 |
=========================================================================
Outputs & filters:
-------------------------------------
......@@ -7849,23 +7859,25 @@ Outputs & filters:
6 - output([t4.a]), filter(nil),
access([t4.a])
7 - output([EXCEPT([1])]), filter(nil)
8 - output([EXCEPT([1])]), filter(nil), sort_keys([EXCEPT([1]), ASC]), Local Order
9 - output([EXCEPT([1])]), filter(nil), dop=1
10 - output([EXCEPT([1])]), filter(nil)
11 - output([EXCEPT([1])]), filter(nil)
12 - output([t1.a]), filter(nil),
8 - output([EXCEPT([1])]), filter(nil)
9 - output([EXCEPT([1])]), filter(nil), sort_keys([EXCEPT([1]), ASC])
10 - output([EXCEPT([1])]), filter(nil), dop=1
11 - output([EXCEPT([1])]), filter(nil), sort_keys([EXCEPT([1]), ASC]), local merge sort
12 - output([EXCEPT([1])]), filter(nil)
13 - output([EXCEPT([1])]), filter(nil)
14 - output([t1.a]), filter(nil),
access([t1.a]), partitions(p[0-4])
13 - output([t2.a]), filter(nil),
15 - output([t2.a]), filter(nil),
access([t2.a]), partitions(p[0-4])
14 - output([t3.b]), filter(nil), sort_keys([t3.b, ASC])
15 - output([t3.b]), filter(nil), dop=1
16 - output([t3.b]), filter(nil), sort_keys([t3.b, ASC])
17 - output([t3.b]), filter(nil)
18 - output([t3.b]), filter(nil),
17 - output([t3.b]), filter(nil), dop=1
18 - output([t3.b]), filter(nil), sort_keys([t3.b, ASC])
19 - output([t3.b]), filter(nil)
20 - output([t3.b]), filter(nil),
access([t3.b]), partitions(p[0-4])
19 - output([t5.a], [t5.b], [t5.c]), filter(nil), sort_keys([t5.a, ASC]), local merge sort
20 - output([t5.a], [t5.b], [t5.c]), filter(nil)
21 - output([t5.a], [t5.b], [t5.c]), filter(nil),
21 - output([t5.a], [t5.b], [t5.c]), filter(nil), sort_keys([t5.a, ASC]), local merge sort
22 - output([t5.a], [t5.b], [t5.c]), filter(nil)
23 - output([t5.a], [t5.b], [t5.c]), filter(nil),
access([t5.a], [t5.b], [t5.c]), partitions(p[0-4])
explain select * from (select a from t1 except select 1 a except select b from t3) as t4, t1 as t5 where t4.a = t5.a;
......@@ -7986,27 +7998,29 @@ Outputs & filters:
explain select * from (select a from t1 except select a from t2 except select 1 a) as t3, t1 as t4 where t3.a = t4.a;
Query Plan
=======================================================================
|ID|OPERATOR |NAME |EST. ROWS |COST |
-----------------------------------------------------------------------
|0 |PX COORDINATOR | |2450250000|2125103997|
|1 | EXCHANGE OUT DISTR |:EX10002|2450250000|1661222341|
|2 | MERGE JOIN | |2450250000|1661222341|
|3 | EXCHANGE IN DISTR | |500000 |1159406 |
|4 | EXCHANGE OUT DISTR (PKEY) |:EX10001|500000 |1135741 |
|5 | SUBPLAN SCAN |t3 |500000 |1135741 |
|6 | MERGE EXCEPT DISTINCT | |500000 |1066730 |
|7 | EXCHANGE IN MERGE SORT DISTR| |500000 |902213 |
|8 | EXCHANGE OUT DISTR |:EX10000|500000 |878548 |
|9 | PX PARTITION ITERATOR | |500000 |878548 |
|10| MERGE EXCEPT DISTINCT | |500000 |878548 |
|11| TABLE SCAN |t1 |500000 |309262 |
|12| TABLE SCAN |t2 |500000 |309262 |
|13| EXPRESSION | |1 |1 |
|14| SORT | |500000 |1578063 |
|15| PX PARTITION ITERATOR | |500000 |331321 |
|16| TABLE SCAN |t4 |500000 |331321 |
=======================================================================
========================================================================
|ID|OPERATOR |NAME |EST. ROWS |COST |
------------------------------------------------------------------------
|0 |PX COORDINATOR | |2450250000|2126248418|
|1 | EXCHANGE OUT DISTR |:EX10002|2450250000|1662366762|
|2 | MERGE JOIN | |2450250000|1662366762|
|3 | EXCHANGE IN DISTR | |500000 |2303827 |
|4 | EXCHANGE OUT DISTR (PKEY) |:EX10001|500000 |2280162 |
|5 | MATERIAL | |500000 |2280162 |
|6 | SUBPLAN SCAN |t3 |500000 |2188285 |
|7 | MERGE EXCEPT DISTINCT | |500000 |2119274 |
|8 | EXCHANGE IN MERGE SORT DISTR| |500000 |1954757 |
|9 | EXCHANGE OUT DISTR |:EX10000|500000 |1931092 |
|10| SORT | |500000 |1931092 |
|11| PX PARTITION ITERATOR | |500000 |878548 |
|12| MERGE EXCEPT DISTINCT | |500000 |878548 |
|13| TABLE SCAN |t1 |500000 |309262 |
|14| TABLE SCAN |t2 |500000 |309262 |
|15| EXPRESSION | |1 |1 |
|16| SORT | |500000 |1578063 |
|17| PX PARTITION ITERATOR | |500000 |331321 |
|18| TABLE SCAN |t4 |500000 |331321 |
========================================================================
Outputs & filters:
-------------------------------------
......@@ -8016,22 +8030,24 @@ Outputs & filters:
equal_conds([t3.a = t4.a]), other_conds(nil)
3 - output([t3.a]), filter(nil)
4 - (#keys=1, [t3.a]), output([t3.a]), filter(nil), is_single, dop=1
5 - output([t3.a]), filter(nil),
5 - output([t3.a]), filter(nil)
6 - output([t3.a]), filter(nil),
access([t3.a])
6 - output([EXCEPT([1])]), filter(nil)
7 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil), sort_keys([cast(EXCEPT([1]), BIGINT(20, 0)), ASC]), Local Order
8 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil), dop=1
9 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil)
10 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil)
11 - output([t1.a]), filter(nil),
7 - output([EXCEPT([1])]), filter(nil)
8 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil), sort_keys([cast(EXCEPT([1]), BIGINT(20, 0)), ASC])
9 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil), dop=1
10 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil), sort_keys([cast(EXCEPT([1]), BIGINT(20, 0)), ASC]), local merge sort
11 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil)
12 - output([cast(EXCEPT([1]), BIGINT(20, 0))]), filter(nil)
13 - output([t1.a]), filter(nil),
access([t1.a]), partitions(p[0-4])
12 - output([t2.a]), filter(nil),
14 - output([t2.a]), filter(nil),
access([t2.a]), partitions(p[0-4])
13 - output([1]), filter(nil)
15 - output([1]), filter(nil)
values({1})
14 - output([t4.a], [t4.b], [t4.c]), filter(nil), sort_keys([t4.a, ASC]), local merge sort
15 - output([t4.a], [t4.b], [t4.c]), filter(nil)
16 - output([t4.a], [t4.b], [t4.c]), filter(nil),
16 - output([t4.a], [t4.b], [t4.c]), filter(nil), sort_keys([t4.a, ASC]), local merge sort
17 - output([t4.a], [t4.b], [t4.c]), filter(nil)
18 - output([t4.a], [t4.b], [t4.c]), filter(nil),
access([t4.a], [t4.b], [t4.c]), partitions(p[0-4])
explain select * from (select t2.a from t1, t2 where t1.a = t2.a except select a from t1 as t3) as t4, t2 as t5 where t4.a = t5.a;
......
......@@ -118,6 +118,6 @@ drop view v1;
create view v1 as select version() from dual limit 10;
desc v1;
Field Type Null Key Default Extra
version() varchar(5) NO
version() varchar(18) NO
drop view v1;
connection conn_admin;
......@@ -214,7 +214,7 @@ Outputs & filters:
equal_conds([cast(t2.c2, DECIMAL(-1, -1)) = VIEW1.1]), other_conds(nil)
2 - output([VIEW1.1]), filter(nil),
access([VIEW1.1])
3 - output([cast(1, DECIMAL(1, 0))]), filter(nil), limit(1), offset(nil)
3 - output([?]), filter(nil), limit(1), offset(nil)
4 - output([1]), filter(nil),
conds(nil), nl_params_(nil)
5 - output([1]), filter(nil),
......
......@@ -41,11 +41,10 @@ NULL 1990-09-01 12:34:56.000000 1990-09-01 12:34:56.000000 1990-09-01 12:34:56.0
2015/05/30 11/12/13 2015-05-30 11:12:13.000000 2015-05-30 11:12:13.000000 2015-05-30 11:12:13.000000
2015@05!30 11~12`13 2015-05-30 11:12:13.000000 2015-05-30 11:12:13.000000 2015-05-30 11:12:13.000000
2015^05%30 11$12#13 2015-05-30 11:12:13.000000 2015-05-30 11:12:13.000000 2015-05-30 11:12:13.000000
9999-12-31 23:59:59 9999-12-31 23:59:59.000000 0000-00-00 00:00:00.000000 9999-12-31 23:59:59.000000
9999-12-31 23:59:59 9999-12-31 23:59:59.000000 9999-12-31 23:59:59.000000 9999-12-31 23:59:59.000000
set time_zone='-8:00';
select str_val, ts_val from dt order by ts_val, str_val;
str_val ts_val
9999-12-31 23:59:59 0000-00-00 00:00:00.000000
1000-01-01 00:00:00 0999-12-31 08:00:00.000000
10111213141516 1011-12-12 22:15:16.000000
1969-12-31 23:59:59 1969-12-31 07:59:59.000000
......@@ -61,6 +60,7 @@ NULL 1990-08-31 20:34:56.000000
2015/05/30 11/12/13 2015-05-29 19:12:13.000000
2015@05!30 11~12`13 2015-05-29 19:12:13.000000
2015^05%30 11$12#13 2015-05-29 19:12:13.000000
9999-12-31 23:59:59 9999-12-31 07:59:59.000000
set time_zone='+8:00';
select str_val, date_format(dt_val, '%Y-%b-%D %T %a'), date_format(ts_val, '%Y-%b-%D %T %a') from dt order by dt_val, ts_val, str_val;
str_val date_format(dt_val, '%Y-%b-%D %T %a') date_format(ts_val, '%Y-%b-%D %T %a')
......@@ -79,7 +79,7 @@ NULL 1990-Sep-1st 12:34:56 Sat 1990-Sep-1st 12:34:56 Sat
2015/05/30 11/12/13 2015-May-30th 11:12:13 Sat 2015-May-30th 11:12:13 Sat
2015@05!30 11~12`13 2015-May-30th 11:12:13 Sat 2015-May-30th 11:12:13 Sat
2015^05%30 11$12#13 2015-May-30th 11:12:13 Sat 2015-May-30th 11:12:13 Sat
9999-12-31 23:59:59 9999-Dec-31st 23:59:59 Fri NULL
9999-12-31 23:59:59 9999-Dec-31st 23:59:59 Fri 9999-Dec-31st 23:59:59 Fri
drop table dt;
create table dt(id int primary key auto_increment, str varchar(100), t_val time(6));
insert into dt(str) values
......
select version();
version()
3.1.1-OceanBase CE
3.1.3-OceanBase CE
show variables like 'version';
Variable_name Value
version 3.1.1-OceanBase CE
version 3.1.3-OceanBase CE
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册