修复master内部表占位不一致问题
This commit is contained in:
@ -225,56 +225,6 @@ int ObInnerTableSchema::v_ob_tenant_resource_limit_detail_schema(ObTableSchema &
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::gv_ob_nic_info_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_INVALID_ID);
|
||||
table_schema.set_database_id(OB_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_GV_OB_NIC_INFO_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(0);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(SYSTEM_VIEW);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_GV_OB_NIC_INFO_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT SVR_IP, SVR_PORT, DEVNAME, SPEED_MBPS FROM oceanbase.__all_virtual_nic_info )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(0);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::v_ob_nic_info_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -325,6 +275,56 @@ int ObInnerTableSchema::v_ob_nic_info_schema(ObTableSchema &table_schema)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::gv_ob_nic_info_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_INVALID_ID);
|
||||
table_schema.set_database_id(OB_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_GV_OB_NIC_INFO_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(0);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(SYSTEM_VIEW);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_GV_OB_NIC_INFO_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT SVR_IP, SVR_PORT, DEVNAME, SPEED_MBPS FROM oceanbase.__all_virtual_nic_info )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(0);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace share
|
||||
} // end namespace oceanbase
|
||||
|
||||
@ -1714,8 +1714,8 @@ public:
|
||||
static int v_ob_tenant_resource_limit_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int gv_ob_tenant_resource_limit_detail_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int v_ob_tenant_resource_limit_detail_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int gv_ob_nic_info_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int v_ob_nic_info_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int gv_ob_nic_info_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int dba_synonyms_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int dba_objects_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_objects_schema(share::schema::ObTableSchema &table_schema);
|
||||
@ -4495,8 +4495,8 @@ const schema_create_func sys_view_schema_creators [] = {
|
||||
ObInnerTableSchema::v_ob_tenant_resource_limit_schema,
|
||||
ObInnerTableSchema::gv_ob_tenant_resource_limit_detail_schema,
|
||||
ObInnerTableSchema::v_ob_tenant_resource_limit_detail_schema,
|
||||
ObInnerTableSchema::gv_ob_nic_info_schema,
|
||||
ObInnerTableSchema::v_ob_nic_info_schema,
|
||||
ObInnerTableSchema::gv_ob_nic_info_schema,
|
||||
ObInnerTableSchema::dba_synonyms_schema,
|
||||
ObInnerTableSchema::dba_objects_ora_schema,
|
||||
ObInnerTableSchema::all_objects_schema,
|
||||
@ -6151,8 +6151,8 @@ const uint64_t tenant_space_tables [] = {
|
||||
OB_V_OB_TENANT_RESOURCE_LIMIT_TID,
|
||||
OB_GV_OB_TENANT_RESOURCE_LIMIT_DETAIL_TID,
|
||||
OB_V_OB_TENANT_RESOURCE_LIMIT_DETAIL_TID,
|
||||
OB_GV_OB_NIC_INFO_TID,
|
||||
OB_V_OB_NIC_INFO_TID,
|
||||
OB_GV_OB_NIC_INFO_TID,
|
||||
OB_DBA_SYNONYMS_TID,
|
||||
OB_DBA_OBJECTS_ORA_TID,
|
||||
OB_ALL_OBJECTS_TID,
|
||||
@ -8705,8 +8705,8 @@ const char* const tenant_space_table_names [] = {
|
||||
OB_V_OB_TENANT_RESOURCE_LIMIT_TNAME,
|
||||
OB_GV_OB_TENANT_RESOURCE_LIMIT_DETAIL_TNAME,
|
||||
OB_V_OB_TENANT_RESOURCE_LIMIT_DETAIL_TNAME,
|
||||
OB_GV_OB_NIC_INFO_TNAME,
|
||||
OB_V_OB_NIC_INFO_TNAME,
|
||||
OB_GV_OB_NIC_INFO_TNAME,
|
||||
OB_DBA_SYNONYMS_TNAME,
|
||||
OB_DBA_OBJECTS_ORA_TNAME,
|
||||
OB_ALL_OBJECTS_TNAME,
|
||||
|
||||
@ -1450,8 +1450,8 @@ const uint64_t OB_GV_OB_TENANT_RESOURCE_LIMIT_TID = 21550; // "GV$OB_TENANT_RESO
|
||||
const uint64_t OB_V_OB_TENANT_RESOURCE_LIMIT_TID = 21551; // "V$OB_TENANT_RESOURCE_LIMIT"
|
||||
const uint64_t OB_GV_OB_TENANT_RESOURCE_LIMIT_DETAIL_TID = 21552; // "GV$OB_TENANT_RESOURCE_LIMIT_DETAIL"
|
||||
const uint64_t OB_V_OB_TENANT_RESOURCE_LIMIT_DETAIL_TID = 21553; // "V$OB_TENANT_RESOURCE_LIMIT_DETAIL"
|
||||
const uint64_t OB_GV_OB_NIC_INFO_TID = 21580; // "GV$OB_NIC_INFO"
|
||||
const uint64_t OB_V_OB_NIC_INFO_TID = 21581; // "V$OB_NIC_INFO"
|
||||
const uint64_t OB_GV_OB_NIC_INFO_TID = 21586; // "GV$OB_NIC_INFO"
|
||||
const uint64_t OB_DBA_SYNONYMS_TID = 25001; // "DBA_SYNONYMS"
|
||||
const uint64_t OB_DBA_OBJECTS_ORA_TID = 25002; // "DBA_OBJECTS_ORA"
|
||||
const uint64_t OB_ALL_OBJECTS_TID = 25003; // "ALL_OBJECTS"
|
||||
@ -4121,8 +4121,8 @@ const char *const OB_GV_OB_TENANT_RESOURCE_LIMIT_TNAME = "GV$OB_TENANT_RESOURCE_
|
||||
const char *const OB_V_OB_TENANT_RESOURCE_LIMIT_TNAME = "V$OB_TENANT_RESOURCE_LIMIT";
|
||||
const char *const OB_GV_OB_TENANT_RESOURCE_LIMIT_DETAIL_TNAME = "GV$OB_TENANT_RESOURCE_LIMIT_DETAIL";
|
||||
const char *const OB_V_OB_TENANT_RESOURCE_LIMIT_DETAIL_TNAME = "V$OB_TENANT_RESOURCE_LIMIT_DETAIL";
|
||||
const char *const OB_GV_OB_NIC_INFO_TNAME = "GV$OB_NIC_INFO";
|
||||
const char *const OB_V_OB_NIC_INFO_TNAME = "V$OB_NIC_INFO";
|
||||
const char *const OB_GV_OB_NIC_INFO_TNAME = "GV$OB_NIC_INFO";
|
||||
const char *const OB_DBA_SYNONYMS_TNAME = "DBA_SYNONYMS";
|
||||
const char *const OB_DBA_OBJECTS_ORA_TNAME = "DBA_OBJECTS";
|
||||
const char *const OB_ALL_OBJECTS_TNAME = "ALL_OBJECTS";
|
||||
|
||||
@ -34091,25 +34091,6 @@ AND
|
||||
# 21580: EVENTS
|
||||
|
||||
|
||||
def_table_schema(
|
||||
owner = 'gengfu.zpc',
|
||||
table_name = 'GV$OB_NIC_INFO',
|
||||
table_id = '21580',
|
||||
table_type = 'SYSTEM_VIEW',
|
||||
rowkey_columns = [],
|
||||
normal_columns = [],
|
||||
gm_columns = [],
|
||||
in_tenant_space = True,
|
||||
view_definition = """
|
||||
SELECT
|
||||
SVR_IP,
|
||||
SVR_PORT,
|
||||
DEVNAME,
|
||||
SPEED_MBPS
|
||||
FROM oceanbase.__all_virtual_nic_info
|
||||
""".replace("\n", " ")
|
||||
)
|
||||
|
||||
def_table_schema(
|
||||
owner = 'gengfu.zpc',
|
||||
table_name = 'V$OB_NIC_INFO',
|
||||
@ -34135,6 +34116,25 @@ def_table_schema(
|
||||
# 21584: ROLE_ROUTINE_GRANTS
|
||||
# 21585: func
|
||||
|
||||
def_table_schema(
|
||||
owner = 'gengfu.zpc',
|
||||
table_name = 'GV$OB_NIC_INFO',
|
||||
table_id = '21586',
|
||||
table_type = 'SYSTEM_VIEW',
|
||||
rowkey_columns = [],
|
||||
normal_columns = [],
|
||||
gm_columns = [],
|
||||
in_tenant_space = True,
|
||||
view_definition = """
|
||||
SELECT
|
||||
SVR_IP,
|
||||
SVR_PORT,
|
||||
DEVNAME,
|
||||
SPEED_MBPS
|
||||
FROM oceanbase.__all_virtual_nic_info
|
||||
""".replace("\n", " ")
|
||||
)
|
||||
|
||||
#
|
||||
|
||||
# 余留位置(此行之前占位)
|
||||
|
||||
@ -2115,8 +2115,8 @@
|
||||
# 21551: V$OB_TENANT_RESOURCE_LIMIT
|
||||
# 21552: GV$OB_TENANT_RESOURCE_LIMIT_DETAIL
|
||||
# 21553: V$OB_TENANT_RESOURCE_LIMIT_DETAIL
|
||||
# 21580: GV$OB_NIC_INFO
|
||||
# 21581: V$OB_NIC_INFO
|
||||
# 21586: GV$OB_NIC_INFO
|
||||
# 25001: DBA_SYNONYMS
|
||||
# 25002: DBA_OBJECTS
|
||||
# 25003: ALL_OBJECTS
|
||||
|
||||
@ -6171,15 +6171,6 @@ LIMIT_VALUE bigint(20) NO
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.V$OB_TENANT_RESOURCE_LIMIT_DETAIL limit 1);
|
||||
cnt
|
||||
1
|
||||
desc oceanbase.GV$OB_NIC_INFO;
|
||||
Field Type Null Key Default Extra
|
||||
SVR_IP varchar(46) NO NULL
|
||||
SVR_PORT bigint(20) NO NULL
|
||||
DEVNAME varchar(128) NO NULL
|
||||
SPEED_MBPS bigint(20) NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.GV$OB_NIC_INFO limit 1);
|
||||
cnt
|
||||
1
|
||||
desc oceanbase.V$OB_NIC_INFO;
|
||||
Field Type Null Key Default Extra
|
||||
SVR_IP varchar(46) NO
|
||||
@ -6189,6 +6180,15 @@ SPEED_MBPS bigint(20) NO
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.V$OB_NIC_INFO limit 1);
|
||||
cnt
|
||||
1
|
||||
desc oceanbase.GV$OB_NIC_INFO;
|
||||
Field Type Null Key Default Extra
|
||||
SVR_IP varchar(46) NO NULL
|
||||
SVR_PORT bigint(20) NO NULL
|
||||
DEVNAME varchar(128) NO NULL
|
||||
SPEED_MBPS bigint(20) NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.GV$OB_NIC_INFO limit 1);
|
||||
cnt
|
||||
1
|
||||
select case cnt when 0 then NULL else 'UNEXPECTED ERROR: It is expected to be an empty set, which means that all GV$ and V$ view column names are defined consistently' end ERROR_INFO from (select /*+no_rewrite*/ count(*) cnt from
|
||||
(SELECT t.table_name,
|
||||
group_concat(c.column_name) as column_name_list
|
||||
|
||||
@ -8916,15 +8916,6 @@ LIMIT_VALUE bigint(20) NO
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.V$OB_TENANT_RESOURCE_LIMIT_DETAIL limit 1);
|
||||
cnt
|
||||
1
|
||||
desc oceanbase.GV$OB_NIC_INFO;
|
||||
Field Type Null Key Default Extra
|
||||
SVR_IP varchar(46) NO NULL
|
||||
SVR_PORT bigint(20) NO NULL
|
||||
DEVNAME varchar(128) NO NULL
|
||||
SPEED_MBPS bigint(20) NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.GV$OB_NIC_INFO limit 1);
|
||||
cnt
|
||||
1
|
||||
desc oceanbase.V$OB_NIC_INFO;
|
||||
Field Type Null Key Default Extra
|
||||
SVR_IP varchar(46) NO
|
||||
@ -8934,6 +8925,15 @@ SPEED_MBPS bigint(20) NO
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.V$OB_NIC_INFO limit 1);
|
||||
cnt
|
||||
1
|
||||
desc oceanbase.GV$OB_NIC_INFO;
|
||||
Field Type Null Key Default Extra
|
||||
SVR_IP varchar(46) NO NULL
|
||||
SVR_PORT bigint(20) NO NULL
|
||||
DEVNAME varchar(128) NO NULL
|
||||
SPEED_MBPS bigint(20) NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.GV$OB_NIC_INFO limit 1);
|
||||
cnt
|
||||
1
|
||||
select case cnt when 0 then NULL else 'UNEXPECTED ERROR: It is expected to be an empty set, which means that all GV$ and V$ view column names are defined consistently' end ERROR_INFO from (select /*+no_rewrite*/ count(*) cnt from
|
||||
(SELECT t.table_name,
|
||||
group_concat(c.column_name) as column_name_list
|
||||
|
||||
@ -1153,8 +1153,8 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
|
||||
21551 V$OB_TENANT_RESOURCE_LIMIT 1 201001 1
|
||||
21552 GV$OB_TENANT_RESOURCE_LIMIT_DETAIL 1 201001 1
|
||||
21553 V$OB_TENANT_RESOURCE_LIMIT_DETAIL 1 201001 1
|
||||
21580 GV$OB_NIC_INFO 1 201001 1
|
||||
21581 V$OB_NIC_INFO 1 201001 1
|
||||
21586 GV$OB_NIC_INFO 1 201001 1
|
||||
check sys table count and table_id range success
|
||||
check count and table_id range for virtual table success
|
||||
select * from information_schema.CHARACTER_SETS limit 1;
|
||||
|
||||
Reference in New Issue
Block a user