diff options
author | Eugene Kosov <claprix@yandex.ru> | 2019-05-19 23:15:55 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-20 10:23:17 +0300 |
commit | 48a662dae5cd5dcc2d3cd9cd03104b5152c1d23c (patch) | |
tree | e2d5bb33510f1022e84a46a8e80ccc6dcd429604 /mysql-test/suite/versioning | |
parent | 7056812ed15abb398089b9c6aa6d7bf5c3cb8c0e (diff) | |
download | mariadb-git-48a662dae5cd5dcc2d3cd9cd03104b5152c1d23c.tar.gz |
MDEV-19486 Server crashes in row_upd or row_upd_del_mark_clust_rec on REPLACE into a versioned table
row_insert_for_mysql(): InnoDB sets values for row_start and row_end.
And this function used to return those values to server in
ha_innobase::write_row(). This buggy behavior was removed. Also,
a piece of code in this function was reformatted.
upd_node_t::make_versioned_helper(): Assert that the preallocated size
of the update vector is not exceeded.
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r-- | mysql-test/suite/versioning/r/replace.result | 14 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/replace.test | 17 |
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/replace.result b/mysql-test/suite/versioning/r/replace.result index 1711be5212e..4173432ff45 100644 --- a/mysql-test/suite/versioning/r/replace.result +++ b/mysql-test/suite/versioning/r/replace.result @@ -32,5 +32,19 @@ insert into t1 values (1,1); create or replace table t2 (c int); create or replace view v as select t1.* from t1 join t2; replace into v (a, b) select a, b from t1; +drop table t1; +CREATE TABLE t1 ( +pk INT AUTO_INCREMENT, +f INT, +row_start SYS_DATATYPE AS ROW START INVISIBLE, +row_end SYS_DATATYPE AS ROW END INVISIBLE, +PRIMARY KEY(pk), +UNIQUE(f), +PERIOD FOR SYSTEM_TIME(row_start, row_end) +) WITH SYSTEM VERSIONING; +INSERT INTO t1 () VALUES (),(),(),(),(),(); +UPDATE IGNORE t1 SET f = 1; +REPLACE t1 SELECT * FROM t1; +DROP TABLE t1; drop database test; create database test; diff --git a/mysql-test/suite/versioning/t/replace.test b/mysql-test/suite/versioning/t/replace.test index bc7e084758d..391cd2a12fc 100644 --- a/mysql-test/suite/versioning/t/replace.test +++ b/mysql-test/suite/versioning/t/replace.test @@ -35,6 +35,23 @@ insert into t1 values (1,1); create or replace table t2 (c int); create or replace view v as select t1.* from t1 join t2; replace into v (a, b) select a, b from t1; +drop table t1; + +--replace_result $sys_datatype_expl SYS_DATATYPE +eval CREATE TABLE t1 ( + pk INT AUTO_INCREMENT, + f INT, + row_start $sys_datatype_expl AS ROW START INVISIBLE, + row_end $sys_datatype_expl AS ROW END INVISIBLE, + PRIMARY KEY(pk), + UNIQUE(f), + PERIOD FOR SYSTEM_TIME(row_start, row_end) +) WITH SYSTEM VERSIONING; +INSERT INTO t1 () VALUES (),(),(),(),(),(); +UPDATE IGNORE t1 SET f = 1; +REPLACE t1 SELECT * FROM t1; +DROP TABLE t1; + drop database test; create database test; |