summaryrefslogtreecommitdiff
path: root/mysql-test/suite/versioning
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r--mysql-test/suite/versioning/r/replace.result14
-rw-r--r--mysql-test/suite/versioning/t/replace.test17
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;