From 5fb08323e1513c95fa92182e24255a4b863185a4 Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Fri, 16 Feb 2018 11:34:52 +0300 Subject: [PATCH] Tests: versioning.foreign check row_end after constraint execution --- mysql-test/suite/versioning/r/foreign.result | 9 ++++++--- mysql-test/suite/versioning/t/foreign.test | 9 +++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/mysql-test/suite/versioning/r/foreign.result b/mysql-test/suite/versioning/r/foreign.result index 1e288e2a176..43b05d06ca3 100644 --- a/mysql-test/suite/versioning/r/foreign.result +++ b/mysql-test/suite/versioning/r/foreign.result @@ -121,6 +121,9 @@ engine innodb; create or replace table child ( id int primary key, parent_id int not null, +row_start SYS_DATATYPE as row start invisible, +row_end SYS_DATATYPE as row end invisible, +period for system_time(row_start, row_end), constraint `parent-fk` foreign key (parent_id) references parent (id) on delete cascade @@ -135,9 +138,9 @@ delete from child; delete from parent; select * from child; id parent_id -select * from child for system_time all; -id parent_id -3 3 +select *, row_start < row_end, row_end < MAXVAL from child for system_time all; +id parent_id row_start < row_end row_end < MAXVAL +3 3 1 1 drop table child; drop table parent; ################# diff --git a/mysql-test/suite/versioning/t/foreign.test b/mysql-test/suite/versioning/t/foreign.test index b9404f12459..03980c40dbf 100644 --- a/mysql-test/suite/versioning/t/foreign.test +++ b/mysql-test/suite/versioning/t/foreign.test @@ -137,9 +137,13 @@ create or replace table parent ( ) engine innodb; -create or replace table child ( +--replace_result $sys_datatype_expl SYS_DATATYPE +eval create or replace table child ( id int primary key, parent_id int not null, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time(row_start, row_end), constraint `parent-fk` foreign key (parent_id) references parent (id) on delete cascade @@ -154,7 +158,8 @@ delete from child; --echo ## FIXME END delete from parent; select * from child; -select * from child for system_time all; +--replace_result $sys_datatype_max MAXVAL +eval select *, row_start < row_end, row_end < $sys_datatype_max from child for system_time all; drop table child; drop table parent;