Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Cannot Reproduce
-
10.3.27, 10.3(EOL), 10.4(EOL), 10.5
-
None
-
10.3.27-MariaDB-0+deb10u1
Description
Version 10.3.27 on Debian tested, have not tested other platforms.
Create two tables, both with system versioning. Table one has some random records in it. Table two has a foreign key reference to table one with a cascading delete. Create some records.
Running a delete query of the format "DELETE table1 FROM table1" does not cascade the deletion to table2 while the query "DELETE FROM table1" does cascade as expected.
--source include/have_innodb.inc
|
|
create table t1 ( |
id tinyint unsigned not null auto_increment, |
value char(1), |
primary key ( id ) |
) engine=innodb with system versioning; |
create table t2 ( |
parent tinyint unsigned not null, |
foreign key ( parent ) references t1 ( id ) on update cascade on delete cascade |
) engine=innodb with system versioning; |
|
insert into t1 (value) values ('a'), ('b'); |
insert into t2 values (1), (2); |
|
delete from t1 where id = 1; |
delete t1 from t1 where id = 2; |
select * from t1; |
|
drop tables t2, t1; |