Bug #57263 After changing Foreign key behavior the comboBoxes (both) does not show changes
Submitted: 5 Oct 2010 21:01 Modified: 27 Jun 2013 19:24
Reporter: Pedram Ganjeh Hadidi Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.28 CE Rev. 6722 OS:Windows (7 - 64Bit)
Assigned to: CPU Architecture:Any
Tags: changing foreign key behavior not shown in comboboxes

[5 Oct 2010 21:01] Pedram Ganjeh Hadidi
Description:
You can define a new foreign key and set the behavior to "RESTRICT" (or whatever) but this change will not be shown in the same comboboxes (where you can choose "RESTRICT") after (successful) alteration of the table.

How to repeat:
1. Create DB
2. Add 2 Tables
3. Add id columns to both "id" BIGINT(20) UNSIGNED AUTO INCREMENT NOT NULL PRIMARY KEY
4. Add other columns to both "fk_blabla_id" to one of your tables (lets call it table A)
5. open context menu on table A
6. select "Alter table..."
7. select tab "Foreign keys"
8. try to add a new foreign key "fk_blabla" to refrenced table B, choose "id" from table B and set bot comboBoxes "On Update" and "On Delete" to whatever you want (for example "RESTRICT")
9. Now click on "Apply", if succeeded, then goto step 5 and watch what you will see if you choose the foreign key (or referenced)... they are empty!
[7 Oct 2010 16:32] Johannes Taxacher
this happens, because RESTRICT is the default policy for FKs and not explicitly returned by server in the "SHOW CREATE" result (which is used to populate the table-editor).
[27 Jun 2013 19:24] Philip Olson
Fixed as of MySQL Workbench 5.2.47, and here's the changelog entry:

The foreign key settings for "On Update" and "On Delete" would sometimes
be lost after adding a new foreign key.

Thank you for the bug report.