Bug #5495 "On Update" selection not working
Submitted: 9 Sep 2004 16:19 Modified: 13 Sep 2004 9:45
Reporter: Jose Miguel Pérez Ruiz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.0.7 beta OS:Windows (Windows 2000/XP)
Assigned to: Michael G. Zinner CPU Architecture:Any

[9 Sep 2004 16:19] Jose Miguel Pérez Ruiz
Description:
The "On Update" selection combo box is not working to create or modify a foreign key constraint.

For instance, if you select "Cascade" on the "On Update" combo box editing a foreign key, and then press "Apply Changes", the changes is not taken into acount.

Tested against:
MySQL Server: 4.1.4-gamma-standard
MySQL Server: 4.0.13

How to repeat:
#1
A) Open MySQL Query Browser
B) Select a database schema with a table containing FK constraints
C) Edit a table with a FK constraint
D) Select tab "Foreign Keys" and click to select the FK constraint
E) Select another action to take "On Update": If the current action is "Cascade" select another action, like "Set Null"
F) Push button "Apply Changes"
G) There should be a message box saying "The changes you made did not result in the need to alter the table"

#2
A) Please do steps A to D above (Opening a schema, editing a table, etc).
B) Select another action to take "On Delete" instead of "On Update".
C) Push button "Apply Changes".
D) Please note that this time the message box warns about the changes to be made to the table. This is an "ALTER TABLE" statement including the needed ON DELETE change.
E) In the above statement, there is an ON UPDATE clause, but it's not the correct UP UPDATE action selected in the combo box.

Suggested fix:
The code must take into account the combo box selection.
[13 Sep 2004 9:45] Michael G. Zinner
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html