Bug #13102 | MySQL/InnoDB does not execute trigger ON DELETE for cascade deleting rows | ||
---|---|---|---|
Submitted: | 10 Sep 2005 10:00 | Modified: | 1 Dec 2006 10:04 |
Reporter: | Nikolay Shestakov | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | 5.0, 5.1 | OS: | Linux (Debian GNU/Linux) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[10 Sep 2005 10:00]
Nikolay Shestakov
[11 Sep 2005 8:42]
Heikki Tuuri
I think this shortcoming has already been reported in the bugs database. Marking this as a duplicate.
[11 Sep 2005 9:20]
Heikki Tuuri
Looks like this has not been reported in the bugs database, even though this is a known shortcoming. I am reopening this bug report.
[25 Jan 2006 16:24]
Martin Fernau
just want to say, that I can reproduce this bug with the latest Version of mysql 5.0.18
[11 Mar 2006 2:56]
Scott Marlowe
This is another one of those things that should cause an error (when defining the cascading delete) or at the very least a warning. While it's acceptable for myisam tables to just trundle along error free, innodb is what lets MySQL compete with the big boys. Swallowing a cascading delete assignent without actually making it is the worst of options for innodb tables. I think this points to a need to have contextual error handling based on the table handler in use at the time of a query being run. Otherwise these problems will be a hairy nightmare to fix.
[11 Mar 2006 8:57]
Heikki Tuuri
Scott, right, MySQL-5.0 should give a warning if one creates a trigger on a table with a cascading FOREIGN KEY constraint and vice versa. This bug is still in 5.1. Regards, Heikki
[6 Sep 2006 10:08]
Heikki Tuuri
Changing the category to Triggers, because the MySQL interpreter needs to give the warning. Or we can wait for MySQL foreign keys to be implemented for all table types, which will solve this problem.
[1 Dec 2006 10:04]
Dmitry Lenev
Hi! This bug is duplicate of bug#11472.
[8 Dec 2006 17:18]
Xavier GUIBERT
Thanks for your comment Dmitri: you point out that this lack is open since june 2005, and we are nearly in 2007. Yes a warning would be a good thing, but implementing the feature would be good too... "OS" should be modified to "*", as it occurs on all OS I imagine. About warnings concerning features not implemented, I'll try to open a separate request: things like "constraint ... check", "signal", ...
[16 Feb 2007 7:36]
Prabha Vadlamani
I encountered this problem too with 5.0. Is this going to be fixed?