-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential data inconsistency when widen pk column type if pk is h…
…andle (#3568) (#3574) * Fix potential data loss when widen pk when pk is handle * add widen_pk.test Co-authored-by: lidezhu <lidezhu@pingcap.com> Co-authored-by: lidezhu <47731263+lidezhu@users.noreply.github.com>
- Loading branch information
1 parent
15b2664
commit 00f52be
Showing
2 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
mysql> drop table if exists test.t | ||
mysql> create table test.t(a int primary key) | ||
mysql> alter table test.t set tiflash replica 1 | ||
|
||
func> wait_table test t | ||
|
||
mysql> insert into test.t values(1); | ||
|
||
mysql> select /*+ read_from_storage(tiflash[t]) */ * from test.t; | ||
+---+ | ||
| a | | ||
+---+ | ||
| 1 | | ||
+---+ | ||
|
||
>> DBGInvoke __enable_schema_sync_service('false') | ||
|
||
mysql> alter table test.t modify column a bigint; | ||
|
||
mysql> insert into test.t values(9223372036854775807); | ||
|
||
mysql> select /*+ read_from_storage(tiflash[t]) */ * from test.t; | ||
+---------------------+ | ||
| a | | ||
+---------------------+ | ||
| 1 | | ||
| 9223372036854775807 | | ||
+---------------------+ |