Bug #51280 Adding a foreign key
Submitted: 18 Feb 2010 13:40 Modified: 18 Mar 2010 22:51
Reporter: Jordan Thompson Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.15 Beta, 5.2.16 OS:Windows (Windows 7 64-bit)
Assigned to: CPU Architecture:Any

[18 Feb 2010 13:40] Jordan Thompson
Description:

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:
I got this exception when trying to select a foreign column to relate a table column to.  This was on an existing model that I was adding a new column to.
[18 Feb 2010 13:50] MySQL Verification Team
Thank you for the bug report. Could you please try 5.2.16 version?. Thanks in advance.
[18 Feb 2010 14:17] Jordan Thompson
This has happened pretty often - The app never appears to crash, but when I went to forward engineer the model, the new tables I created were not in the SQL.  This is troubling because from the diagram's perspective, everything looks fine.

The good news is that if you save the model and re-open it, the SQL is correctly generated.
[18 Feb 2010 22:57] MySQL Verification Team
Thank you for the feedback. Have you tried the last release 5.2.16?. Thanks in advance,
[28 Feb 2010 9:17] Valeriy Kravchuk
Bug #51581 was marked as a duplicate of this one.
[28 Feb 2010 9:19] Valeriy Kravchuk
Bug #51461 was marked as a duplicate of this one.
[19 Mar 2010 0: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".