[UPGRADE] Modify sys view definition when lower_case_table_names = 0

This commit is contained in:
tino247
2024-02-08 23:13:30 +00:00
committed by ob-robot
parent c9005994bc
commit 6751c284c5
2 changed files with 22 additions and 22 deletions

View File

@ -23375,8 +23375,8 @@ def_table_schema(
cast(stat.bucket_cnt as NUMBER) as NUM_BUCKETS,
cast(stat.last_analyzed as DATETIME(6)) as LAST_ANALYZED,
cast(stat.sample_size as NUMBER) as SAMPLE_SIZE,
CAST((CASE STAT.GLOBAL_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS GLOBAL_STATS,
CAST((CASE STAT.USER_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS USER_STATS,
CAST((CASE stat.GLOBAL_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS GLOBAL_STATS,
CAST((CASE stat.USER_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS USER_STATS,
cast(NULL as CHAR(80)) as NOTES,
cast(stat.avg_len as NUMBER) as AVG_COL_LEN,
cast((case when stat.histogram_type = 1 then 'FREQUENCY'
@ -23390,7 +23390,7 @@ def_table_schema(
TABLE_ID,
TABLE_NAME
FROM
OCEANBASE.__ALL_VIRTUAL_CORE_ALL_TABLE
oceanbase.__all_virtual_core_all_table
WHERE TENANT_ID = EFFECTIVE_TENANT_ID()
UNION ALL
SELECT TENANT_ID,
@ -23398,12 +23398,12 @@ def_table_schema(
table_id,
table_name
FROM oceanbase.__all_table where table_type in (0,2,3,6,14)
and table_mode >> 12 & 15 in (0,1)) T
and table_mode >> 12 & 15 in (0,1)) t
JOIN
oceanbase.__all_database db
ON db.tenant_id = t.tenant_id
AND db.database_id = t.database_id
AND T.TENANT_ID = 0
and t.tenant_id = 0
JOIN
(SELECT CAST(0 AS SIGNED) AS TENANT_ID,
TABLE_ID,
@ -23453,8 +23453,8 @@ def_table_schema(
cast(stat.bucket_cnt as NUMBER) as NUM_BUCKETS,
cast(stat.last_analyzed as DATETIME(6)) as LAST_ANALYZED,
cast(stat.sample_size as NUMBER) as SAMPLE_SIZE,
CAST((CASE STAT.GLOBAL_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS GLOBAL_STATS,
CAST((CASE STAT.USER_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS USER_STATS,
CAST((CASE stat.GLOBAL_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS GLOBAL_STATS,
CAST((CASE stat.USER_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS USER_STATS,
cast(NULL as CHAR(80)) as NOTES,
cast(stat.avg_len as NUMBER) as AVG_COL_LEN,
cast((case when stat.histogram_type = 1 then 'FREQUENCY'
@ -23467,7 +23467,7 @@ def_table_schema(
oceanbase.__all_database db
ON db.tenant_id = t.tenant_id
AND db.database_id = t.database_id
AND T.TENANT_ID = 0
and t.tenant_id = 0
JOIN
oceanbase.__all_column c
ON c.tenant_id = t.tenant_id
@ -23511,8 +23511,8 @@ def_table_schema(
cast(stat.bucket_cnt as NUMBER) as NUM_BUCKETS,
cast(stat.last_analyzed as DATETIME(6)) as LAST_ANALYZED,
cast(stat.sample_size as NUMBER) as SAMPLE_SIZE,
CAST((CASE STAT.GLOBAL_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS GLOBAL_STATS,
CAST((CASE STAT.USER_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS USER_STATS,
CAST((CASE stat.GLOBAL_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS GLOBAL_STATS,
CAST((CASE stat.USER_STATS WHEN 0 THEN 'NO' WHEN 1 THEN 'YES' ELSE NULL END) AS CHAR(3)) AS USER_STATS,
cast(NULL as CHAR(80)) as NOTES,
cast(stat.avg_len as NUMBER) as AVG_COL_LEN,
cast((case when stat.histogram_type = 1 then 'FREQUENCY'
@ -23525,7 +23525,7 @@ def_table_schema(
oceanbase.__all_database db
ON db.tenant_id = t.tenant_id
AND db.database_id = t.database_id
AND T.TENANT_ID = 0
and t.tenant_id = 0
JOIN
oceanbase.__all_column c
ON c.tenant_id = t.tenant_id
@ -23572,19 +23572,19 @@ def_table_schema(
TABLE_ID,
TABLE_NAME
FROM
OCEANBASE.__ALL_VIRTUAL_CORE_ALL_TABLE
oceanbase.__all_virtual_core_all_table
UNION ALL
SELECT TENANT_ID,
database_id,
table_id,
table_name
FROM oceanbase.__all_table where table_type in (0,3,6,14)
and table_mode >> 12 & 15 in (0,1)) T
and table_mode >> 12 & 15 in (0,1)) t
JOIN
oceanbase.__all_database db
ON db.tenant_id = t.tenant_id
AND db.database_id = t.database_id
AND T.TENANT_ID = 0
and t.tenant_id = 0
JOIN
oceanbase.__all_column c
ON c.tenant_id = t.tenant_id
@ -23624,7 +23624,7 @@ def_table_schema(
oceanbase.__all_database db
ON db.tenant_id = t.tenant_id
AND db.database_id = t.database_id
AND T.TENANT_ID = 0
and t.tenant_id = 0
JOIN
oceanbase.__all_column c
ON c.tenant_id = t.tenant_id
@ -23671,7 +23671,7 @@ def_table_schema(
oceanbase.__all_database db
ON db.tenant_id = t.tenant_id
AND db.database_id = t.database_id
AND T.TENANT_ID = 0
and t.tenant_id = 0
JOIN
oceanbase.__all_column c
ON c.tenant_id = t.tenant_id