Add placeholder to change column type of data_version in __all_transfer_task

This commit is contained in:
obdev
2024-02-23 04:50:51 +00:00
committed by ob-robot
parent d5d96db4ec
commit f667ad87d9
5 changed files with 46 additions and 30 deletions

View File

@ -10247,18 +10247,22 @@ int ObInnerTableSchema::all_virtual_transfer_task_schema(ObTableSchema &table_sc
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_version", //column_name ObObj data_version_default;
data_version_default.set_varchar(ObString::make_string(""));
ADD_COLUMN_SCHEMA_T("data_version", //column_name
++column_id, //column_id ++column_id, //column_id
0, //rowkey_id 0, //rowkey_id
0, //index_id 0, //index_id
0, //part_key_pos 0, //part_key_pos
ObUInt64Type, //column_type ObVarcharType, //column_type
CS_TYPE_INVALID, //column_collation_type CS_TYPE_INVALID, //column_collation_type
sizeof(uint64_t), //column_length OB_CLUSTER_VERSION_LENGTH, //column_length
-1, //column_precision -1, //column_precision
-1, //column_scale -1, //column_scale
true, //is_nullable true, //is_nullable
false); //is_autoincrement false, //is_autoincrement
data_version_default,
data_version_default); //default_value
} }
table_schema.set_index_using_type(USING_BTREE); table_schema.set_index_using_type(USING_BTREE);
table_schema.set_row_store_type(ENCODING_ROW_STORE); table_schema.set_row_store_type(ENCODING_ROW_STORE);
@ -10655,18 +10659,22 @@ int ObInnerTableSchema::all_virtual_transfer_task_history_schema(ObTableSchema &
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_version", //column_name ObObj data_version_default;
data_version_default.set_varchar(ObString::make_string(""));
ADD_COLUMN_SCHEMA_T("data_version", //column_name
++column_id, //column_id ++column_id, //column_id
0, //rowkey_id 0, //rowkey_id
0, //index_id 0, //index_id
0, //part_key_pos 0, //part_key_pos
ObUInt64Type, //column_type ObVarcharType, //column_type
CS_TYPE_INVALID, //column_collation_type CS_TYPE_INVALID, //column_collation_type
sizeof(uint64_t), //column_length OB_CLUSTER_VERSION_LENGTH, //column_length
-1, //column_precision -1, //column_precision
-1, //column_scale -1, //column_scale
true, //is_nullable true, //is_nullable
false); //is_autoincrement false, //is_autoincrement
data_version_default,
data_version_default); //default_value
} }
table_schema.set_index_using_type(USING_BTREE); table_schema.set_index_using_type(USING_BTREE);
table_schema.set_row_store_type(ENCODING_ROW_STORE); table_schema.set_row_store_type(ENCODING_ROW_STORE);

View File

@ -1500,11 +1500,11 @@ int ObInnerTableSchema::all_virtual_transfer_task_real_agent_ora_schema(ObTableS
0, //rowkey_id 0, //rowkey_id
0, //index_id 0, //index_id
0, //part_key_pos 0, //part_key_pos
ObNumberType, //column_type ObVarcharType, //column_type
CS_TYPE_INVALID, //column_collation_type CS_TYPE_UTF8MB4_BIN, //column_collation_type
38, //column_length OB_CLUSTER_VERSION_LENGTH, //column_length
38, //column_precision 2, //column_precision
0, //column_scale -1, //column_scale
true, //is_nullable true, //is_nullable
false); //is_autoincrement false); //is_autoincrement
} }
@ -1889,11 +1889,11 @@ int ObInnerTableSchema::all_virtual_transfer_task_history_real_agent_ora_schema(
0, //rowkey_id 0, //rowkey_id
0, //index_id 0, //index_id
0, //part_key_pos 0, //part_key_pos
ObNumberType, //column_type ObVarcharType, //column_type
CS_TYPE_INVALID, //column_collation_type CS_TYPE_UTF8MB4_BIN, //column_collation_type
38, //column_length OB_CLUSTER_VERSION_LENGTH, //column_length
38, //column_precision 2, //column_precision
0, //column_scale -1, //column_scale
true, //is_nullable true, //is_nullable
false); //is_autoincrement false); //is_autoincrement
} }

View File

@ -4578,18 +4578,22 @@ int ObInnerTableSchema::all_transfer_task_schema(ObTableSchema &table_schema)
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_version", //column_name ObObj data_version_default;
data_version_default.set_varchar(ObString::make_string(""));
ADD_COLUMN_SCHEMA_T("data_version", //column_name
++column_id, //column_id ++column_id, //column_id
0, //rowkey_id 0, //rowkey_id
0, //index_id 0, //index_id
0, //part_key_pos 0, //part_key_pos
ObUInt64Type, //column_type ObVarcharType, //column_type
CS_TYPE_INVALID, //column_collation_type CS_TYPE_INVALID, //column_collation_type
sizeof(uint64_t), //column_length OB_CLUSTER_VERSION_LENGTH, //column_length
-1, //column_precision -1, //column_precision
-1, //column_scale -1, //column_scale
true, //is_nullable true, //is_nullable
false); //is_autoincrement false, //is_autoincrement
data_version_default,
data_version_default); //default_value
} }
table_schema.set_index_using_type(USING_BTREE); table_schema.set_index_using_type(USING_BTREE);
table_schema.set_row_store_type(ENCODING_ROW_STORE); table_schema.set_row_store_type(ENCODING_ROW_STORE);
@ -4987,18 +4991,22 @@ int ObInnerTableSchema::all_transfer_task_history_schema(ObTableSchema &table_sc
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_version", //column_name ObObj data_version_default;
data_version_default.set_varchar(ObString::make_string(""));
ADD_COLUMN_SCHEMA_T("data_version", //column_name
++column_id, //column_id ++column_id, //column_id
0, //rowkey_id 0, //rowkey_id
0, //index_id 0, //index_id
0, //part_key_pos 0, //part_key_pos
ObUInt64Type, //column_type ObVarcharType, //column_type
CS_TYPE_INVALID, //column_collation_type CS_TYPE_INVALID, //column_collation_type
sizeof(uint64_t), //column_length OB_CLUSTER_VERSION_LENGTH, //column_length
-1, //column_precision -1, //column_precision
-1, //column_scale -1, //column_scale
true, //is_nullable true, //is_nullable
false); //is_autoincrement false, //is_autoincrement
data_version_default,
data_version_default); //default_value
} }
table_schema.set_index_using_type(USING_BTREE); table_schema.set_index_using_type(USING_BTREE);
table_schema.set_row_store_type(ENCODING_ROW_STORE); table_schema.set_row_store_type(ENCODING_ROW_STORE);

View File

@ -5370,7 +5370,7 @@ def_table_schema(
('comment', 'longtext', 'true'), ('comment', 'longtext', 'true'),
('balance_task_id', 'int', 'false'), ('balance_task_id', 'int', 'false'),
('table_lock_owner_id', 'int', 'true'), ('table_lock_owner_id', 'int', 'true'),
('data_version', 'uint', 'true'), ('data_version', 'varchar:OB_CLUSTER_VERSION_LENGTH', 'true', ''),
], ],
) )
@ -5408,7 +5408,7 @@ def_table_schema(
('table_lock_owner_id', 'int', 'true'), ('table_lock_owner_id', 'int', 'true'),
('create_time', 'timestamp', 'false'), ('create_time', 'timestamp', 'false'),
('finish_time', 'timestamp', 'false'), ('finish_time', 'timestamp', 'false'),
('data_version', 'uint', 'true'), ('data_version', 'varchar:OB_CLUSTER_VERSION_LENGTH', 'true', ''),
], ],
) )

View File

@ -7398,7 +7398,7 @@ result bigint(20) YES NULL
comment longtext YES NULL comment longtext YES NULL
balance_task_id bigint(20) NO NULL balance_task_id bigint(20) NO NULL
table_lock_owner_id bigint(20) YES NULL table_lock_owner_id bigint(20) YES NULL
data_version bigint(20) unsigned YES NULL data_version varchar(256) YES
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_transfer_task; select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_transfer_task;
IF(count(*) >= 0, 1, 0) IF(count(*) >= 0, 1, 0)
1 1
@ -7427,7 +7427,7 @@ balance_task_id bigint(20) NO NULL
table_lock_owner_id bigint(20) YES NULL table_lock_owner_id bigint(20) YES NULL
create_time timestamp(6) NO NULL create_time timestamp(6) NO NULL
finish_time timestamp(6) NO NULL finish_time timestamp(6) NO NULL
data_version bigint(20) unsigned YES NULL data_version varchar(256) YES
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_transfer_task_history; select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_transfer_task_history;
IF(count(*) >= 0, 1, 0) IF(count(*) >= 0, 1, 0)
1 1