I have two (InnoDB) tables with triggers for UPDATE, INSERT and DELETE. They work fine if I work directly on the tables. Further I have a foreign key constraint when I delete a row in tableA all rows in tableB referenced by tableA.id get also deleted. That also works but the problem is:
A DELETE on tableA triggers the DELETE-trigger for tableA. Then the constraint deletes rows at tableB but no DELETE-triggers for tableB get called. Why? Do constraints do not trigger triggers?
Thanks.
(Triggers are AFTER DELETE. Tried also with BEFORE DELETE without success.)
CONSTRAINT cname FOREIGN KEY (idA) REFERENCES tableA (id) ON DELETE CASCADE ON UPDATE CASCADE,- Lorenz