Bug #10468 | Foreign Key: ON DELETE NO ACTION option does not work for foreign key. | ||
---|---|---|---|
Submitted: | 9 May 2005 11:05 | Modified: | 9 May 2005 11:25 |
Reporter: | Disha | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.4 Beta | OS: | Windows (Windows 2003) |
Assigned to: | CPU Architecture: | Any |
[9 May 2005 11:05]
Disha
[9 May 2005 11:25]
Jan Lindström
Thank you for your bug report. However, this is not a bug. Under the ANSI SQL-92 standard, NO ACTION means "no action" in the sense that an attempt to delete or update a primary key value will not be allowed to proceed if there is a related foreign key value in the referenced table (Gruber, 2000:181). It is therefore the ANSI syntax for explicitly enforcing referential integrity and is supported by SQL Server 2000, Oracle 9 amongst other database systems. As of 4.0.18 InnoDB checks the foreign key constraint, not ignore it. Since we do not have deferred constraints in InnoDB, this makes InnoDB to check NO ACTION constraints immediately, like it checks RESTRICT constraints. Regards, JanL
[10 May 2005 9:49]
Jan Lindström
Hi, I will add some additional detailed documentation of the referential action specified using ON UPDATE and ON DETETE subclauses of the FOREIGN KEY clause. Regards JanL