Bug #50764 Bug When Entering Foreign Keys
Submitted: 31 Jan 2010 10:50 Modified: 1 Mar 2010 11:35
Reporter: Martin Pirringer Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.15 OS:Windows (7)
Assigned to: CPU Architecture:Any
Tags: exception, foreign key

[31 Jan 2010 10:50] Martin Pirringer
Description:
When clicking on the poup for the references when entering FK the following error occurs

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:
Seems to be intermittend as I was able to enter 2FK quite fine - happened on the 2nd one
[1 Feb 2010 11:35] MySQL Verification Team
I couldn't repeat this issue, please provide your project file which cause that behavior or a sequences of pictures which show how to repeat?. Thanks in advance.
[17 Feb 2010 10:53] Be Wa
I have encountered the same problem with different versions, this very minute repeated with last version.

How to reproduce:

All the tables I created were in the diagram

I created a table called g.
columns: id (int, pk,nn,un)

I created a table called p.
columns: id (int, pk,nn,un)
         p  (tinyint, pk,nn,un)
foreign key: column id references column id of table g

[so far, no problem]

I created a table called a.
columns: gid (int, pk,nn,un)
         pid (tinyint, pk,nn,un)
         ida (bigint, nn,un)
foreign key: column gid references column id of table p [not table g!]
             column pid references column p of table p [ERROR]

The error occured exactly when clicking the checkbox in the right side of the "foreign keys" tab (the checkbox in the column named "Column", left to "Referenced Column".)

If I manage to close the error-window, I may even save the model and upload it.
[18 Feb 2010 23:17] Leslie Brown
Just encountered the identical problem, but I may have a scenario that allows you to reproduce it. (I'd already created several foreign keys without problems.)

Here's the context, stripped of extraneous details:

Two tables, B and D that contain a reference to the same table C.

In Table D, I create a foreign key on column c_id, pointing to the primary index of table C (no comment, options left at default values). 

Immediately, I double-click on table B (which is displayed collapsed) to perform the identical edit: a foreign key on column c_id, pointing to the primary index of table C. The "bug" window flashes up... 
Note that the foreigh key DOES get created in table B !
[2 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".