Bug #3439 | ON UPDATE CASCADE doesn't work on self-referential tables | ||
---|---|---|---|
Submitted: | 11 Apr 2004 19:55 | Modified: | 13 May 2010 16:03 |
Reporter: | Matthias Urlichs | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S4 (Feature request) |
Version: | 4.0.1.18 | OS: | Linux (Linux 2.4) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[11 Apr 2004 19:55]
Matthias Urlichs
[11 Apr 2004 19:56]
Matthias Urlichs
OK, it's critical to me, but I suppose not to too many other people ...
[11 Apr 2004 20:26]
MySQL Verification Team
Verified against 4.0.19 Windows server: mysql> UPDATE x1 SET kk='foo'; Query OK, 1 row affected (0.05 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> UPDATE x1 SET k='bar'; ERROR 1217: Cannot delete or update a parent row: a foreign key constraint fails
[14 Sep 2004 13:04]
Heikki Tuuri
Hi! This is the documented behavior. Therefore I am converting this bug report to a feature request. Regards, Heikki
[14 Sep 2004 13:30]
Matthias Urlichs
Well, that's your call. I'd like to note, however, that while the current behavior may be documented as such, it can't possibly be described as 'correct'. In fact, this problem prevents a client from switching to MySQL. I'll have to ask them how far they'd go in expressing their happiness to be able to drop $EXPENSIVE_DB in terms of money, but ... Any rough idea about a timetable for implementing this?
[9 May 2007 10:08]
Marko Mäkelä
Bug #5103 was marked as a duplicate of this.
[24 Apr 2012 2:53]
Wutikrai Pornchai
I am one facing this problem. I bet most advanced developer frequently use self-reference style where it's appropriate. I myself intensively use this style. Lack of this feature make MYSQL look less interesting. It does not make sense not having this basic feature while it have done normally for 2 table relation. Is there any workaround?