diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2020-07-20 18:28:07 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2020-07-20 18:28:07 +0300 |
commit | af57c658090cc52aa20e8cde7d24a563d73ff886 (patch) | |
tree | 8e0dadc7c3d5d42226b2e8b49b19a1613767d48b /mysql-test/suite/versioning | |
parent | acc58fd83584c49049951a2c54c7f82a0c7ec412 (diff) | |
download | mariadb-git-af57c658090cc52aa20e8cde7d24a563d73ff886.tar.gz |
MDEV-22061 InnoDB: Assertion of missing row in sec index row_start upon REPLACE on a system-versioned table
make_versioned_helper() appended new update field unconditionally
while it should check if this field already exists in update vector.
Misc renames to conform versioning prefix. vers_update_fields() name
conforms with sql layer TABLE::vers_update_fields().
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r-- | mysql-test/suite/versioning/r/update.result | 16 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/update.test | 20 |
2 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/update.result b/mysql-test/suite/versioning/r/update.result index f7901d11d2a..512e39355e2 100644 --- a/mysql-test/suite/versioning/r/update.result +++ b/mysql-test/suite/versioning/r/update.result @@ -319,3 +319,19 @@ create or replace table t1 (f point, key(f)) with system versioning engine=myisa update t1 set f = null where f = 'foo'; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; +# +# MDEV-22061 InnoDB: Assertion of missing row in sec index row_start upon REPLACE on a system-versioned table +# +create or replace table t1 ( +a int, +b int, +row_start bigint(20) unsigned generated always as row start, +row_end bigint(20) unsigned generated always as row end, +unique key (b,row_end), +key (row_start), +period for system_time (row_start,row_end) +) engine=innodb with system versioning; +insert into t1 (a, b) values (1, 2); +replace into t1 (a, b) values (3, 2); +replace into t1 (a, b) values (4, 2); +drop table t1; diff --git a/mysql-test/suite/versioning/t/update.test b/mysql-test/suite/versioning/t/update.test index 5b0a9eb5c42..d2af2cac80c 100644 --- a/mysql-test/suite/versioning/t/update.test +++ b/mysql-test/suite/versioning/t/update.test @@ -245,4 +245,24 @@ update t1 set f = null where f = 'foo'; # cleanup drop table t1; +--echo # +--echo # MDEV-22061 InnoDB: Assertion of missing row in sec index row_start upon REPLACE on a system-versioned table +--echo # +create or replace table t1 ( + a int, + b int, + row_start bigint(20) unsigned generated always as row start, + row_end bigint(20) unsigned generated always as row end, + unique key (b,row_end), + key (row_start), + period for system_time (row_start,row_end) +) engine=innodb with system versioning; + +insert into t1 (a, b) values (1, 2); +replace into t1 (a, b) values (3, 2); +replace into t1 (a, b) values (4, 2); + +# cleanup +drop table t1; + source suite/versioning/common_finish.inc; |