Bug #44116 | Allow ON CASCADE SET NULL with multi-column NOT NULL FKs | ||
---|---|---|---|
Submitted: | 6 Apr 2009 17:44 | Modified: | 28 Sep 2010 14:20 |
Reporter: | Jaka JanÄar | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[6 Apr 2009 17:44]
Jaka JanÄar
[6 Apr 2009 17:45]
Jaka JanÄar
I incorrectly set severity.
[28 Sep 2010 14:20]
Susanne Ebrecht
Hello, I am looking for the sense here. You are only allowed to choose one of these: DELETE CASCADE DELETE RESTRICT DELETE SET NULL DELETE NO ACTION It's not possible to mix. When I use DELETE RESTRICT (which should be default given by SQL Standard) then nothing will get deleted as long as you have referenced values. When you use DELETE CASCADE then all rows in all tables that are referenced and have the value will get deleted. NOT NULL is a constraint. When you set NOT NULL constraint to a table then of course you can't use SET NULL. All this is given that way in SQL standard and MySQL is behaving standard conform here.