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:
@@ -102,14 +102,38 @@ create or replace table child (
|
||||
)
|
||||
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;
|
||||
|
||||
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;
|
||||
select * from child for system_time all;
|
||||
|
||||
drop table child;
|
||||
drop table parent;
|
||||
|
||||
#################
|
||||
# Test SET NULL #
|
||||
#################
|
||||
|
Reference in New Issue
Block a user