diff --git a/src/share/inner_table/ob_inner_table_schema.12401_12450.cpp b/src/share/inner_table/ob_inner_table_schema.12401_12450.cpp index 6cae39d7fd..55b38d1861 100644 --- a/src/share/inner_table/ob_inner_table_schema.12401_12450.cpp +++ b/src/share/inner_table/ob_inner_table_schema.12401_12450.cpp @@ -10469,6 +10469,44 @@ int ObInnerTableSchema::all_virtual_clone_job_schema(ObTableSchema &table_schema true, //is_nullable false); //is_autoincrement } + + if (OB_SUCC(ret)) { + ObObj data_version_default; + data_version_default.set_uint64(0); + ADD_COLUMN_SCHEMA_T("data_version", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + data_version_default, + data_version_default); //default_value + } + + if (OB_SUCC(ret)) { + ObObj min_cluster_version_default; + min_cluster_version_default.set_uint64(0); + ADD_COLUMN_SCHEMA_T("min_cluster_version", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + min_cluster_version_default, + min_cluster_version_default); //default_value + } 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); @@ -10840,6 +10878,44 @@ int ObInnerTableSchema::all_virtual_clone_job_history_schema(ObTableSchema &tabl true, //is_nullable false); //is_autoincrement } + + if (OB_SUCC(ret)) { + ObObj data_version_default; + data_version_default.set_uint64(0); + ADD_COLUMN_SCHEMA_T("data_version", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + data_version_default, + data_version_default); //default_value + } + + if (OB_SUCC(ret)) { + ObObj min_cluster_version_default; + min_cluster_version_default.set_uint64(0); + ADD_COLUMN_SCHEMA_T("min_cluster_version", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + min_cluster_version_default, + min_cluster_version_default); //default_value + } 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); diff --git a/src/share/inner_table/ob_inner_table_schema.451_500.cpp b/src/share/inner_table/ob_inner_table_schema.451_500.cpp index afb6342e82..62dc282937 100644 --- a/src/share/inner_table/ob_inner_table_schema.451_500.cpp +++ b/src/share/inner_table/ob_inner_table_schema.451_500.cpp @@ -10853,6 +10853,44 @@ int ObInnerTableSchema::all_clone_job_schema(ObTableSchema &table_schema) true, //is_nullable false); //is_autoincrement } + + if (OB_SUCC(ret)) { + ObObj data_version_default; + data_version_default.set_uint64(0); + ADD_COLUMN_SCHEMA_T("data_version", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + data_version_default, + data_version_default); //default_value + } + + if (OB_SUCC(ret)) { + ObObj min_cluster_version_default; + min_cluster_version_default.set_uint64(0); + ADD_COLUMN_SCHEMA_T("min_cluster_version", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + min_cluster_version_default, + min_cluster_version_default); //default_value + } 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); @@ -11240,6 +11278,44 @@ int ObInnerTableSchema::all_clone_job_history_schema(ObTableSchema &table_schema true, //is_nullable false); //is_autoincrement } + + if (OB_SUCC(ret)) { + ObObj data_version_default; + data_version_default.set_uint64(0); + ADD_COLUMN_SCHEMA_T("data_version", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + data_version_default, + data_version_default); //default_value + } + + if (OB_SUCC(ret)) { + ObObj min_cluster_version_default; + min_cluster_version_default.set_uint64(0); + ADD_COLUMN_SCHEMA_T("min_cluster_version", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + min_cluster_version_default, + min_cluster_version_default); //default_value + } 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); diff --git a/src/share/inner_table/ob_inner_table_schema_def.py b/src/share/inner_table/ob_inner_table_schema_def.py index 3e44a44898..688fdc6d69 100644 --- a/src/share/inner_table/ob_inner_table_schema_def.py +++ b/src/share/inner_table/ob_inner_table_schema_def.py @@ -6814,6 +6814,8 @@ def_table_schema( ('clone_finished_time', 'timestamp', 'true'), ('ret_code', 'int', 'true'), ('error_msg', 'varchar:OB_MAX_ERROR_MSG_LEN', 'true'), + ('data_version', 'uint', 'false', '0'), + ('min_cluster_version', 'uint', 'false', '0'), ], ) @@ -6848,6 +6850,8 @@ all_clone_job_history_def = dict( ('clone_finished_time', 'timestamp', 'false'), ('ret_code', 'int', 'true'), ('error_msg', 'varchar:OB_MAX_ERROR_MSG_LEN', 'true'), + ('data_version', 'uint', 'false', '0'), + ('min_cluster_version', 'uint', 'false', '0'), ], ) def_table_schema(**all_clone_job_history_def) diff --git a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/desc_virtual_table_in_mysql.result b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/desc_virtual_table_in_mysql.result index 17abdc0820..466eedaea0 100644 --- a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/desc_virtual_table_in_mysql.result +++ b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/desc_virtual_table_in_mysql.result @@ -4665,6 +4665,8 @@ clone_start_time timestamp(6) NO NULL clone_finished_time timestamp(6) YES NULL ret_code bigint(20) YES NULL error_msg varchar(512) YES NULL +data_version bigint(20) unsigned NO 0 +min_cluster_version bigint(20) unsigned NO 0 select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_clone_job; IF(count(*) >= 0, 1, 0) 1 @@ -4691,6 +4693,8 @@ clone_start_time timestamp(6) NO NULL clone_finished_time timestamp(6) NO NULL ret_code bigint(20) YES NULL error_msg varchar(512) YES NULL +data_version bigint(20) unsigned NO 0 +min_cluster_version bigint(20) unsigned NO 0 select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_clone_job_history; IF(count(*) >= 0, 1, 0) 1 diff --git a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/desc_virtual_table_in_sys.result b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/desc_virtual_table_in_sys.result index 50f3d8a738..d08760fe28 100644 --- a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/desc_virtual_table_in_sys.result +++ b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/desc_virtual_table_in_sys.result @@ -9081,6 +9081,8 @@ clone_start_time timestamp(6) NO NULL clone_finished_time timestamp(6) YES NULL ret_code bigint(20) YES NULL error_msg varchar(512) YES NULL +data_version bigint(20) unsigned NO 0 +min_cluster_version bigint(20) unsigned NO 0 select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_clone_job; IF(count(*) >= 0, 1, 0) 1 @@ -9107,6 +9109,8 @@ clone_start_time timestamp(6) NO NULL clone_finished_time timestamp(6) NO NULL ret_code bigint(20) YES NULL error_msg varchar(512) YES NULL +data_version bigint(20) unsigned NO 0 +min_cluster_version bigint(20) unsigned NO 0 select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_clone_job_history; IF(count(*) >= 0, 1, 0) 1