Commit 5fb08323 authored by Aleksey Midenkov's avatar Aleksey Midenkov Committed by Sergei Golubchik

Tests: versioning.foreign check row_end after constraint execution

parent 052668f5
...@@ -121,6 +121,9 @@ engine innodb; ...@@ -121,6 +121,9 @@ engine innodb;
create or replace table child ( create or replace table child (
id int primary key, id int primary key,
parent_id int not null, 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` constraint `parent-fk`
foreign key (parent_id) references parent (id) foreign key (parent_id) references parent (id)
on delete cascade on delete cascade
...@@ -135,9 +138,9 @@ delete from child; ...@@ -135,9 +138,9 @@ delete from child;
delete from parent; delete from parent;
select * from child; select * from child;
id parent_id id parent_id
select * from child for system_time all; select *, row_start < row_end, row_end < MAXVAL from child for system_time all;
id parent_id id parent_id row_start < row_end row_end < MAXVAL
3 3 3 3 1 1
drop table child; drop table child;
drop table parent; drop table parent;
################# #################
......
...@@ -137,9 +137,13 @@ create or replace table parent ( ...@@ -137,9 +137,13 @@ create or replace table parent (
) )
engine innodb; engine innodb;
create or replace table child ( --replace_result $sys_datatype_expl SYS_DATATYPE
eval create or replace table child (
id int primary key, id int primary key,
parent_id int not null, 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` constraint `parent-fk`
foreign key (parent_id) references parent (id) foreign key (parent_id) references parent (id)
on delete cascade on delete cascade
...@@ -154,7 +158,8 @@ delete from child; ...@@ -154,7 +158,8 @@ delete from child;
--echo ## FIXME END --echo ## FIXME END
delete from parent; delete from parent;
select * from child; 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 child;
drop table parent; drop table parent;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment