1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

IB: skip check_ref on historical record [fixes #101]

This commit is contained in:
Aleksey Midenkov
2016-12-25 08:25:17 +00:00
parent ea60760e47
commit 4383e16cbe
3 changed files with 65 additions and 6 deletions

View File

@@ -80,13 +80,36 @@ on delete cascade
on update restrict
)
engine innodb;
insert into parent (id) values (1);
insert into child (x, parent_id) values (1, 1);
insert into parent (id) values (2);
insert into child (x, parent_id) values (2, 2);
delete from parent;
select * from child;
x parent_id
drop table child;
drop table parent;
create or replace table parent (
id int primary key
)
engine innodb;
create or replace table child (
id int primary key,
parent_id int not null,
constraint `parent-fk`
foreign key (parent_id) references parent (id)
on delete cascade
on update restrict
) with system versioning
engine innodb;
insert into parent (id) values (3);
insert into child (id, parent_id) values (3, 3);
delete from parent;
select * from child;
id parent_id
select * from child for system_time all;
id parent_id
3 3
drop table child;
drop table parent;
create table parent(
id int unique key
) engine innodb;