The Manual says: http://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html
Currently, cascaded foreign key actions do not activate triggers.
Any Idea when will this be implemented.
Is there a work around for this?
|
The Manual says: http://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html
Any Idea when will this be implemented. Is there a work around for this? |
||||
|
|
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
|
Not to start a flamewar, but this does work in PostgreSQL for years. When using innoDB, it should be relative simple to move to PostgreSQL. |
|||||||||
|
|
IMHO I do not think this feature will be implemented in the foreseeable future. Why? Triggers are, by nature, stored procedures. Their actions are virtually hard to roll back. Even if all underlying tables are InnoDB, you will experience a proportional volume of shared row locks and annoying intermittency from exclusive row locks. Such would be the case if triggers were manipulating tables with INSERTs and UPDATEs being stagnated to perform heavy duty MVCC inside each call to a trigger. Always keep in mind that a Trigger can require major overhead. In fact, According to this book
MySQL Stored Procedure Programming, page 256 under the heading "Trigger Overhead" says the following:
An expanded explanation of trigger overhead is given on pages 529-531. The concluding point from that section states the following:
I also explained other nasty aspects of Triggers in an earlier post. In light of these things, until Triggers can be redesigned to handle Transaction Isolation, I do not see Triggers being tied into CASCADE operations anytime soon. |
|||||
|