diff --git a/src/share/inner_table/ob_inner_table_schema.12251_12300.cpp b/src/share/inner_table/ob_inner_table_schema.12251_12300.cpp index 9bf53b84d..b9b43af5a 100644 --- a/src/share/inner_table/ob_inner_table_schema.12251_12300.cpp +++ b/src/share/inner_table/ob_inner_table_schema.12251_12300.cpp @@ -2383,6 +2383,25 @@ int ObInnerTableSchema::all_virtual_ddl_checksum_schema(ObTableSchema &table_sch false, //is_nullable false); //is_autoincrement } + + if (OB_SUCC(ret)) { + ObObj tablet_id_default; + tablet_id_default.set_int(0); + ADD_COLUMN_SCHEMA_T("tablet_id", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObIntType, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(int64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + tablet_id_default, + tablet_id_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.151_200.cpp b/src/share/inner_table/ob_inner_table_schema.151_200.cpp index 5a7679d1a..348833582 100644 --- a/src/share/inner_table/ob_inner_table_schema.151_200.cpp +++ b/src/share/inner_table/ob_inner_table_schema.151_200.cpp @@ -5572,6 +5572,25 @@ int ObInnerTableSchema::all_ddl_checksum_schema(ObTableSchema &table_schema) false, //is_nullable false); //is_autoincrement } + + if (OB_SUCC(ret)) { + ObObj tablet_id_default; + tablet_id_default.set_int(0); + ADD_COLUMN_SCHEMA_T("tablet_id", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObIntType, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(int64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + tablet_id_default, + tablet_id_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 4be373e6a..748ee9eeb 100644 --- a/src/share/inner_table/ob_inner_table_schema_def.py +++ b/src/share/inner_table/ob_inner_table_schema_def.py @@ -1499,6 +1499,7 @@ def_table_schema( normal_columns = [ ('checksum', 'int'), + ('tablet_id', 'int', 'false', 0), ], )