Open AdamKatzDev opened 8 months ago
yes this is a known edge case for debezium and MySQL. here is a workaround.
https://stackoverflow.com/questions/57443976/debezium-does-not-capture-cascade-delete
@aadant is there a complete solution for this issue? A script for Clickhouse or MySQL that keep the triggers in a synced state? For some removing cascade operations is not an option. I was really surprised when stumbled upon this bug, it wasn't a known issue for me at least.
@AdamKatzDev it would be a custom solution on your end.
Not sure if this is a well known caveat but: https://bugs.mysql.com/bug.php?id=32506 - Foreign key cascades do not appear when binlog_format = 'ROW'
I hoped to use this connector for a project with a lot of
ON CASCADE
in schema. Probably the fact thatON CASCADE
child operations are not replicated for MySQL should be mentioned somewhere in the connector documentation. There could even be some protection added to the connector code itself.Other sources: https://dev.mysql.com/doc/refman/8.0/en/innodb-and-mysql-replication.html
https://code.openark.org/blog/mysql/things-that-dont-work-well-with-mysqls-foreign-key-implementation
https://debezium.io/documentation/faq/