| Bug #2418 | REPLACE does not trigger ON DELETE CASCADE | ||
|---|---|---|---|
| Submitted: | 15 Jan 2004 23:51 | Modified: | 9 Feb 2004 14:56 |
| Reporter: | Dean Ellis | ||
| Status: | Closed | ||
| Category: | Server | Severity: | S3 (Non-critical) |
| Version: | 4.0.18 | OS: | |
| Assigned to: | Heikki Tuuri | Target Version: | |
[15 Jan 2004 23:51]
Dean Ellis
[5 Feb 2004 0: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 14: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
