Bug #51807 Application thrown exception when applying foreign key
Submitted: 7 Mar 2010 10:47 Modified: 28 Apr 2010 12:42
Reporter: Pradeep Kumar Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.16 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: -

[7 Mar 2010 10:47] Pradeep Kumar
Description:
 WHile creating table I tried to include the foreign key as one of the key present in same table. trying to do so generated an exception.

How to repeat:
Create table xyz
define key as say userID
go to foreign key tab.
degine userID
choose table xyz
press ok
it should throw exception
[7 Mar 2010 10:48] Pradeep Kumar
exception thrown was Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at MySQL.Grt.ListModel.set_field(NodeId node, Int32 column, String value)
   at MySQL.GUI.Workbench.Plugins.DbMysqlTableFkListModel.ValuePushed(Object sender, NodeControlValueEventArgs e)
   at Aga.Controls.Tree.NodeControls.BindableControl.OnValuePushed(NodeControlValueEventArgs args)
   at Aga.Controls.Tree.NodeControls.BindableControl.SetValue(TreeNodeAdv node, Object value)
   at MySQL.Utilities.AdvNodeComboBox.DoApplyChanges(TreeNodeAdv node, Control editor)
   at Aga.Controls.Tree.NodeControls.EditableControl.ApplyChanges()
   at Aga.Controls.Tree.NodeControls.EditableControl.EditorValidating(Object sender, CancelEventArgs e)
   at System.Windows.Forms.Control.OnValidating(CancelEventArgs e)
   at System.Windows.Forms.ComboBox.OnValidating(CancelEventArgs e)
   at System.Windows.Forms.Control.PerformControlValidation(Boolean bulkValidation)
   at System.Windows.Forms.ContainerControl.ValidateThroughAncestor(Control ancestorControl, Boolean preventFocusChangeOnError)
   at System.Windows.Forms.ContainerControl.EnterValidation(Control enterControl)
   at System.Windows.Forms.ContainerControl.UpdateFocusedControl()
   at System.Windows.Forms.ContainerControl.AssignActiveControlInternal(Control value)
   at System.Windows.Forms.ContainerControl.ActivateControlInternal(Control control, Boolean originator)
   at System.Windows.Forms.ContainerControl.ActivateControlInternal(Control control)
   at System.Windows.Forms.Control.WmSetFocus(Message& m)
   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)
[7 Mar 2010 11:04] Valeriy Kravchuk
What exact version of MySQL Workbench, 5.x.y, do you use? Are you trying to add foreign key to the table in the database (in SQL Editor) or in ERR model?
[7 Mar 2010 17:25] Pradeep Kumar
I am using the version 5.2.16OSS Beta Revision 5249.
I was using SQL Development Editor to create a table and define some of its columns.
[10 Mar 2010 7:27] Susanne Ebrecht
Many thanks for writing a bug report.

I am not able to repeat this. I don't get an exception ... but I just can't create a foreign key on same table ... the system don't let me do this.

Do you really used the SQL Editor here or do you use the diagram?
[10 Mar 2010 16:12] Pradeep Kumar
I shall try to reproduce the issue and let you know the steps.
[10 Mar 2010 16:16] Pradeep Kumar
I shall try to reproduce the issue and let you know the steps.
[28 Apr 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".