Bug #46049 Unable to code stored procedures (Routines)
Submitted: 8 Jul 2009 17:13 Modified: 7 Aug 2009 14:35
Reporter: Amir Shakoor Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.1.16 OS:Windows (XP/2003)
Assigned to: Sergei Tkachenko CPU Architecture:Any

[8 Jul 2009 17:13] Amir Shakoor
Description:
Tested on Windows XP (32-bit) and Windows 2003 Server Standard Edition (32-bit).

Unable to code stored procedures (Routines). After starting Mysql Workbench or creating a new MWB (Ctrl+N), writing code to a SP and then closing the Routine editor window, the code disappears when you open the SP for editing again.

When loading an existing MWB file from a previous version (In my case it was last edited with 5.1.14 OSS RC) into 5.1.16 SE the SP parameters/code also does not show up. 

However, If I Forward Engineer from the existing MWB file (i.e. have not viewed the SP) the code from the SP does show up in the Forward Engineer SQL Script review window.

If I attempt to Forward Engineer after I have viewed the SP in the editor, the code then disappears, even though code from other unopened SPs still show up.

How to repeat:
Install MySQL Workbench 5.1.16 SE on Windows XP (32-bit) or Windows 2003 Server Standard Edition (32-bit).

Open MySQL Workbench 5.1.16 SE.

Double-click "Add Routine".

Add the following code in between the BEGIN and END of the SP definition:

     SELECT 'something' as something;

Close the Routine editor.

Double click the routine named 'routine1' (if you did not change the routine name).

The code between the BEGIN and END should not appear.
[8 Jul 2009 17:22] Amir Shakoor
I have tested both OSS ans SE versions on Windows XP (32-bit). I have tested the SE version on Windows 2003 Server Standard Edition (32-bit).
[8 Jul 2009 17:41] MySQL Verification Team
Thank you for the bug report.
[25 Jul 2009 6:21] Milen Simeonov
when you have coded procedures from query browser or else to your base
and try to view them by workbench - sql browser by typing
SHOW CREATE PROCEDURE <procedure>
there will be no code to show
[29 Jul 2009 15:44] Valeriy Kravchuk
Bug #46451 was marked as a duplicate of this one.
[7 Aug 2009 13:10] Johannes Taxacher
issue has been fixed.
fix will be included in 5.1.17
[7 Aug 2009 14:35] Tony Bedford
An entry was added to the 5.1.17 changelog:

When writing code in the Routine Editor it appeared that the code was lost if the Routine Editor was closed.