From 57d990863f4e9d304d91e6364b93486788469efd Mon Sep 17 00:00:00 2001 From: lidezhu Date: Thu, 2 Jun 2022 11:44:00 +0800 Subject: [PATCH] small fix --- dbms/src/Storages/StorageDeltaMerge.h | 2 +- dbms/src/Storages/Transaction/tests/RowCodecTestUtils.h | 4 ++-- tests/fullstack-test2/ddl/alter_column_when_pk_is_handle.test | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dbms/src/Storages/StorageDeltaMerge.h b/dbms/src/Storages/StorageDeltaMerge.h index bb6e710b616..79ee225d237 100644 --- a/dbms/src/Storages/StorageDeltaMerge.h +++ b/dbms/src/Storages/StorageDeltaMerge.h @@ -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 cache_blocks; diff --git a/dbms/src/Storages/Transaction/tests/RowCodecTestUtils.h b/dbms/src/Storages/Transaction/tests/RowCodecTestUtils.h index 50be32dd14f..20b395a9952 100644 --- a/dbms/src/Storages/Transaction/tests/RowCodecTestUtils.h +++ b/dbms/src/Storages/Transaction/tests/RowCodecTestUtils.h @@ -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(std::make_shared(store_columns), table_info, *iter, /* decoding_schema_version_ */1); + return std::make_shared(std::make_shared(store_columns), table_info, *iter, /* decoding_schema_version_ */ 1); } else { - return std::make_shared(std::make_shared(store_columns), table_info, store_columns[0], /* decoding_schema_version_ */1); + return std::make_shared(std::make_shared(store_columns), table_info, store_columns[0], /* decoding_schema_version_ */ 1); } } diff --git a/tests/fullstack-test2/ddl/alter_column_when_pk_is_handle.test b/tests/fullstack-test2/ddl/alter_column_when_pk_is_handle.test index 448dd49d76a..df0aa13823a 100644 --- a/tests/fullstack-test2/ddl/alter_column_when_pk_is_handle.test +++ b/tests/fullstack-test2/ddl/alter_column_when_pk_is_handle.test @@ -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 |