Bug #30813 | Foreign Key constraint fails | ||
---|---|---|---|
Submitted: | 4 Sep 2007 23:04 | Modified: | 5 Oct 2007 5:19 |
Reporter: | Yuri Koba | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 5.0.37 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[4 Sep 2007 23:04]
Yuri Koba
[5 Sep 2007 5:19]
Valeriy Kravchuk
Thank you for a problem report. I was able to repeat the behaviour you described, but looks like it is not a bug, but a documented limitation. Please, read the manual, http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html: "Deviation from SQL standards: If ON UPDATE CASCADE or ON UPDATE SET NULL recurses to update the same table it has previously updated during the cascade, it acts like RESTRICT. This means that you cannot use self-referential ON UPDATE CASCADE or ON UPDATE SET NULL operations. This is to prevent infinite loops resulting from cascaded updates. A self-referential ON DELETE SET NULL, on the other hand, is possible, as is a self-referential ON DELETE CASCADE. Cascading operations may not be nested more than 15 levels deep." Try without ON UPDATE CASCADE and inform about the results.
[5 Oct 2007 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".