Bug #79877 Foreign Key Options not disabled when no FK selected
Submitted: 8 Jan 2016 4:38 Modified: 8 Jan 2016 12:18
Reporter: David Brown Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:6.3.6 build 511 CE 64-bit OS:Any (Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: foreign key

[8 Jan 2016 4:38] David Brown
Description:
When no FK is selected and either of the "On Update" or "On Delete" select/drop-down menus is changed, the following dialog appears:

MySQL Workbench Unexpected Error
MySQL Workbench has encountered a problem
Object reference not set to an instance of an object
(etc.)

Workbench seems to recover.

How to repeat:
In the Model Overview, open the Physical Schemas.  Select any Table; it does not have to have any foreign keys. Select the ForeignKeys tab. Select any value for either the "On Update" or "On Delete" option. (So, select something first, duh.)

Suggested fix:
The On Update and On Delete select menus should be disabled when no Foreign Key is selected.
[8 Jan 2016 12:17] MySQL Verification Team
exception dialog

Attachment: #79877.png (image/png, text), 255.76 KiB.

[8 Jan 2016 12:18] MySQL Verification Team
Thank you for the bug report.

Exception = System.NullReferenceException
Message = Object reference not set to an instance of an object.
FullText = System.NullReferenceException: Object reference not set to an instance of an object.
   at MySQL.GUI.Workbench.Plugins.DbMysqlTableEditor.onUpdateActionComboBox_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ComboBox.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[6 May 2016 9:48] MySQL Verification Team
Bug #81336 marked as duplicate of this