Bug #2418 | REPLACE does not trigger ON DELETE CASCADE | ||
---|---|---|---|
Submitted: | 15 Jan 2004 22:51 | Modified: | 9 Feb 2004 13:56 |
Reporter: | Dean Ellis | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.0.18 | OS: | |
Assigned to: | Heikki Tuuri | CPU Architecture: | Any |
[15 Jan 2004 22:51]
Dean Ellis
[4 Feb 2004 23:58]
Michael Widenius
This is not by design. I have updated the documentation about this issue to make it known until Heikki has fixed this.
[9 Feb 2004 13:56]
Heikki Tuuri
Hi! I have now fixed this in the 4.0 source tree. If a table is referenced by FOREIGN KEY constraints, then from now on sql_insert.cc is not allowed to resolve a duplicate key error in a way where it converts DELETE + INSERT to an UPDATE internally. Though, it may be that some users have thought about REPLACE as an UPDATE in this case, and may be surprised of this behavior change. Regards, Heikki