diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2021-02-14 23:26:12 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2021-03-31 21:25:36 +0300 |
commit | 0c99e6e9a6a5a64b0d757d796ab53d361e7fb001 (patch) | |
tree | f804f78626e541b8ee21e02203655b2526ae1f3c /mysql-test/suite/versioning | |
parent | af52a0e516aa044b7fcdf91b3d2a7036c6c7ae9f (diff) | |
download | mariadb-git-0c99e6e9a6a5a64b0d757d796ab53d361e7fb001.tar.gz |
MDEV-22562 Assertion `next_insert_id == 0' upon UPDATE on system-versioned table
Don't update autoinc counter on history row insert. Uniqueness is kept
due to merge with row_end.
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r-- | mysql-test/suite/versioning/r/autoinc.result (renamed from mysql-test/suite/versioning/r/auto_increment.result) | 10 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/autoinc.test (renamed from mysql-test/suite/versioning/t/auto_increment.test) | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/auto_increment.result b/mysql-test/suite/versioning/r/autoinc.result index 8ff1bed8fe3..e785c5d300e 100644 --- a/mysql-test/suite/versioning/r/auto_increment.result +++ b/mysql-test/suite/versioning/r/autoinc.result @@ -63,3 +63,13 @@ A x y x y 1 7 17 7 17 drop table t1; drop table t2; +# +# MDEV-22562 Assertion `next_insert_id == 0' upon UPDATE on system-versioned table +# +create table t1 (pk integer auto_increment primary key) engine=myisam with system versioning; +insert delayed into t1 (pk) values (1); +lock tables t1 write; +update t1 set pk= 0; +update t1 set pk= 0; +unlock tables; +drop table t1; diff --git a/mysql-test/suite/versioning/t/auto_increment.test b/mysql-test/suite/versioning/t/autoinc.test index 804c0424179..7c87c17301a 100644 --- a/mysql-test/suite/versioning/t/auto_increment.test +++ b/mysql-test/suite/versioning/t/autoinc.test @@ -47,4 +47,17 @@ select t1.x = t2.x and t1.y = t2.y as A, t1.x, t1.y, t2.x, t2.y from t1 inner jo drop table t1; drop table t2; +--echo # +--echo # MDEV-22562 Assertion `next_insert_id == 0' upon UPDATE on system-versioned table +--echo # +create table t1 (pk integer auto_increment primary key) engine=myisam with system versioning; +insert delayed into t1 (pk) values (1); +lock tables t1 write; +update t1 set pk= 0; +update t1 set pk= 0; +unlock tables; + +# cleanup +drop table t1; + -- source suite/versioning/common_finish.inc |