Details
-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
None
-
None
-
False
-
False
-
Undefined
Description
In MySQL when having a FK between two tables with ON DELETE CASCADE, Dbz is not reporting events for the cascade delete. If this is the expected behaviour, please ignore this report.
Steps to reproduce it.
Create master and detail tables, with details having a FK to master with ON DELETE CASCADE:
CREATE TABLE master ( id INT PRIMARY KEY AUTO_INCREMENT, description VARCHAR(255) NOT NULL ); CREATE TABLE detail ( id INT PRIMARY KEY AUTO_INCREMENT, master_id INT NOT NULL, FOREIGN KEY (master_id) REFERENCES master (id) ON DELETE CASCADE );
Insert one row into each table:
insert into master (description) values ('blah');
insert into detail (master_id) values (1);
Delete master records which deletes all detail records:
delete from master;
When I check the topic related to detail table, there are not events for delete nor tombstone records.
Thank you!