Bug #66310 error creating a FK on the modeling tool

Submitted: 10 Aug 2012 16:25 Modified: 16 Oct 2012 2:26
Reporter: Ederson Sparenberger Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.41 OS:Windows (Microsoft Windows XP Professional Service Pack 3 (build 2600))
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[10 Aug 2012 16:25] Ederson Sparenberger
Description:
was trying to create a FK from a large table (20+fields) to a master table (3 fields only) and it wouldnt allow me.
i named the FK, selected the reference table, but the referenced field on the target table wouldnt appear (no fields were displayed, actualy)

----- Developer Notes -----

MySQL Workbench CE for Windows version 5.2.41  revision 9727
Configuration Directory: C:\Documents and Settings\esparenberger\Dados de aplicativos\MySQL\Workbench
Data Directory: C:\Arquivos de programas\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU: 2x Pentium(R) Dual-Core  CPU      E5700  @ 3.00GHz, 3.0 GiB RAM
Active video adapter (0): Intel(R) G41 Express Chipset
Installed video RAM: 256 MB
Current video mode: 1920 x 1080 x 4294967296 cores
Used bit depth: 32
Driver version: 6.14.10.5090
Installed display drivers: igxprd32.dll
Current user language: Português (Brasil)

Exception = System.InvalidCastException
Message = Não é possível converter um objeto do tipo 'MySQL.Forms.MenuImpl' no tipo 'MySQL.GUI.Workbench.Plugins.DockablePlugin'.
FullText = System.InvalidCastException: Não é possível converter um objeto do tipo 'MySQL.Forms.MenuImpl' no tipo 'MySQL.GUI.Workbench.Plugins.DockablePlugin'.
   em MySQL.GUI.Workbench.Plugins.DockablePlugin.GetFromFixedPtr(IntPtr ptr)
   em MySQL.GUI.Workbench.MainForm.ShowPlugin(IntPtr ptr)
   em MySQL.Forms.AppImpl.show_editor_wrapper(UInt32 native_handle)
   em boost.detail.function.void_function_invoker1<void (__cdecl*)(unsigned int),void,unsigned int>.invoke(function_buffer* function_ptr, UInt32 a0)
   em wb.ModelDiagramForm.handle_mouse_double_click(ModelDiagramForm* , MouseButton , Int32 , Int32 , EventState )
   em MySQL.Workbench.ModelDiagramFormWrapper.OnMouseDoubleClick(MouseEventArgs e, Int32 X, Int32 Y, Keys keystate, MouseButtons buttons)
   em MySQL.GUI.Workbench.ModelDiagramForm.CanvasPanel_MouseDoubleClick(Object sender, MouseEventArgs e)
   em System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e)
   em MySQL.Utilities.WindowsCanvasViewerPanel.OnMouseDoubleClick(MouseEventArgs e)
   em System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   em System.Windows.Forms.Control.WndProc(Message& m)
   em System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   em System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   em System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   em System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
was trying to create a FK from a large table (20+fields) to a master table (3 fields only) and it wouldnt allow me.
i named the FK, selected the reference table, but the referenced field on the target table wouldnt appear (no fields were displayed, actualy)
[10 Aug 2012 17:15] Valeriy Kravchuk
Can you upload .mwb file that demonstrates the problem?
[10 Aug 2012 17:22] Ederson Sparenberger
.mwb file that demonstrates the problem

Attachment: ER_crmGO.mwb (application/octet-stream, text), 35.80 KiB.

[10 Aug 2012 17:40] Ederson Sparenberger
I belive the error was caused because i was trying to create a FK with the field PROD_PRODUTO.CODIGOSITUACAOPRODUTO(varchar(1)) , referencing PROD_SITUACAOPRODUTO.CODIGOSITUACAOPRODUTO (int).

And the field PROD_PRODUTO.CODIGOSITUACAOPRODUTO was incorrectly set as varchar.
[10 Aug 2012 18:27] Valeriy Kravchuk
And what exact FK should I try to create with your .mwb to reproduce the problem?
[10 Aug 2012 18:43] Ederson Sparenberger
- Scroll down to the botton of the model, to the table prod_produto.
- double click or right click it, "Edit table". It wont let you.
- try to edit any other table, see if it allows you.
- If it allowed you, try to edit prod_produto again
- if it didnt alow you to edit prod_produto, cut and paste prod_produto on the model
- now it allows you to edit it.
- go to the foreign key tab, and create a FK_PRODUTOSITUACAOPRODUTO, referencing PROD_SITUCAOCAOPRODUTO with the fields CODIGOSITUACAOPRODUTO.

The error should show itself on some point of those steps.
[16 Sep 2012 2:26] MySQL Verification Team
I can't repeat with 5.2.43 . Please try it. Thanks.
[17 Oct 2012 1: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".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.058 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.