Bug #45395 Referential integrity constraint SET DEFAULT missing
Submitted: 9 Jun 2009 10:28 Modified: 11 Jun 2009 22:42
Reporter: Karsten Wutzke Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.x OS:Any
Assigned to:
Tags: foreign keys, integrity constraints, set default
Triage: Triaged: D5 (Feature request)

[9 Jun 2009 10:28] Karsten Wutzke
The setting for SET DEFAULT integrity constraints is missing.

How to repeat:
Go to "Tools" -> "Options..." -> "Model" tab, dropdown ON UPDATE and ON DELETE lack the SET DEFAULT entry.

Same with "Edit Table..." -> "Foreign Keys" tab, highlight any FK, the two dropdowns appearing to the right miss them, too.

BTW: The labels for these GUI's are once all UPPERCASE and once Mixed Case......
[9 Jun 2009 11:05] Karsten Wutzke
I just noticed it's missing in the MySQL server entirely, but I wonder why...?
[9 Jun 2009 12:28] Valeriy Kravchuk
I do not see "SET DEFAULT" as possible option for CREATE TABLE at http://dev.mysql.com/doc/refman/5.1/en/create-table.html. Why do you think it should be supported?
[10 Jun 2009 19:27] Karsten Wutzke
As I mentioned in the other comment. I figured out MySQL server itself does not support SET DEFAULT. So this might not be a bug at all.

Essentially, this becomes a bug, or rather a request for enhancement in MySQL server. InnoDB seems to be the cause SET DEFAULT isn't supported.

However, I don't see why SET DEFAULT is a problem with MySQL or InnoDB.
[11 Jun 2009 7:57] Valeriy Kravchuk
OK, so this is a reasonable feature request for the server (to support "On Delete Set Default" clause for the foreign keys in the same way as SQL Server 2005, for example).
[11 Jun 2009 16:07] Karsten Wutzke
Thanks for changing the type. I didn't know myself when I created this bug report it is actually an InnoDB problem, which I don't see why it shouldn't work.

You might want to follow the discussion I started here:

[11 Jun 2009 22:42] Karsten Wutzke
According to the thread posted, InnoDB will include this in the future. You might want to add this feature to Workbench someday.