occupy position for columns in __all_ddl_checksum

This commit is contained in:
obdev 2023-11-14 04:11:02 +00:00 committed by ob-robot
parent e8303c06bc
commit d04bc629df
3 changed files with 39 additions and 0 deletions

View File

@ -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);

View File

@ -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);

View File

@ -1499,6 +1499,7 @@ def_table_schema(
normal_columns = [
('checksum', 'int'),
('tablet_id', 'int', 'false', 0),
],
)