Skip to content

Commit

Permalink
Tests: versioning.foreign check row_end after constraint execution
Browse files Browse the repository at this point in the history
  • Loading branch information
midenok authored and vuvova committed Feb 23, 2018
1 parent 052668f commit 5fb0832
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
9 changes: 6 additions & 3 deletions mysql-test/suite/versioning/r/foreign.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
#################
Expand Down
9 changes: 7 additions & 2 deletions mysql-test/suite/versioning/t/foreign.test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 5fb0832

Please sign in to comment.