Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lidezhu committed Jun 2, 2022
1 parent 05643a5 commit 57d9908
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbms/src/Storages/StorageDeltaMerge.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class StorageDeltaMerge
// The following two members must be used under the protection of table structure lock
bool decoding_schema_changed = false;
// internal version for `decoding_schema_snapshot`
size_t decoding_schema_version = 1;
Int64 decoding_schema_version = 1;

// avoid creating block every time when decoding row
std::vector<BlockUPtr> cache_blocks;
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Storages/Transaction/tests/RowCodecTestUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ inline DecodingStorageSchemaSnapshotConstPtr getDecodingStorageSchemaSnapshot(co
if (handle_id != EXTRA_HANDLE_COLUMN_ID)
{
auto iter = std::find_if(store_columns.begin(), store_columns.end(), [&](const ColumnDefine & cd) { return cd.id == handle_id; });
return std::make_shared<DecodingStorageSchemaSnapshot>(std::make_shared<ColumnDefines>(store_columns), table_info, *iter, /* decoding_schema_version_ */1);
return std::make_shared<DecodingStorageSchemaSnapshot>(std::make_shared<ColumnDefines>(store_columns), table_info, *iter, /* decoding_schema_version_ */ 1);
}
else
{
return std::make_shared<DecodingStorageSchemaSnapshot>(std::make_shared<ColumnDefines>(store_columns), table_info, store_columns[0], /* decoding_schema_version_ */1);
return std::make_shared<DecodingStorageSchemaSnapshot>(std::make_shared<ColumnDefines>(store_columns), table_info, store_columns[0], /* decoding_schema_version_ */ 1);
}
}

Expand Down
2 changes: 2 additions & 0 deletions tests/fullstack-test2/ddl/alter_column_when_pk_is_handle.test
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ mysql> alter table test.t modify c decimal(6,3)

>> DBGInvoke __disable_fail_point(pause_before_apply_raft_cmd)

=> DBGInvoke __enable_schema_sync_service('true')

mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t
+---+-------+-------+------+------+
| a | b | c | d | e |
Expand Down

0 comments on commit 57d9908

Please sign in to comment.