Bug #52548 My SQL Workbench - Data Modelling Exception
Submitted: 2 Apr 2010 14:36 Modified: 4 May 2010 8:59
Reporter: Kalyan Chakravarthy Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.16 OS:Windows
Assigned to: CPU Architecture:Any

[2 Apr 2010 14:36] Kalyan Chakravarthy
Description:
Trying to add Foreign Keys to a table, when the referenced table was lookedup
got the following exception

Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at bec.FKConstraintColumnsListBE.get_column_is_fk(FKConstraintColumnsListBE* , NodeId* )
   at MySQL.Grt.Db.FKConstraintColumnsListBE.get_column_is_fk(NodeId node)
   at MySQL.GUI.Workbench.Plugins.DbMysqlTableFkColumnListModel.columnEnabledFkNodeControl_CheckStateChanged(Object sender, TreePathEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Aga.Controls.Tree.NodeControls.NodeCheckBox.OnCheckStateChanged(TreePathEventArgs args)
   at Aga.Controls.Tree.NodeControls.NodeCheckBox.OnCheckStateChanged(TreeNodeAdv node)
   at Aga.Controls.Tree.NodeControls.NodeCheckBox.SetCheckState(TreeNodeAdv node, CheckState value)
   at Aga.Controls.Tree.NodeControls.NodeCheckBox.MouseDown(TreeNodeAdvMouseEventArgs args)
   at Aga.Controls.Tree.TreeViewAdv.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
In an existing model.

Add a column to a table
Add a foreign key
 - enter key name
 - enter referenced table
 - check the column in the primary table, workbench tries to lookup the referenced columns....

Voila! You get an exception - not frequently though.
[2 Apr 2010 15:31] Valeriy Kravchuk
What data type do you use for referencing column and what data types columns in referenced table have?

Also I assume that you use version 5.2.16. Is it really so?
[2 Apr 2010 16:05] Kalyan Chakravarthy
Yes the workbench version was 5.2.16, Revision:5249

The datatype that was used was INT in the columns of both the tables.
[4 Apr 2010 8:59] Valeriy Kravchuk
Please, check with a newer version, 5.2.17, and inform about the results.
[4 May 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".