Bug #37546 Cancel when creating Stored Procedures
Submitted: 20 Jun 2008 14:31 Modified: 8 Oct 2008 13:46
Reporter: Don Robertson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.2.12 OS:Windows
Assigned to: Mike Lischke CPU Architecture:Any

[20 Jun 2008 14:31] Don Robertson
Description:
When creating a procedure, it may even be saved when this bug occurs. If changes are made which render the syntax inoperable, if the 'cancel' button is pressed, usually with the intent of reverting to the last functioning code, the entire code is erased and replaced with the name of the procedure.
I.E.
I make the stored procedure "RetrieveFiles"
In the Stored procedure, I write:
SELECT * FROM files;
I execute, and it compiles fine.
I later decide to edit the Stored Procedure, and change it to this:
SELECT * FROM files WHERE ID = nID
For a lack of a semicolon, the query does not compile. I press 'cancel' to revert, open the procedure again and now, the procedure contains this:
RetrieveFiles
It does not compile.

How to repeat:
Simply make a stored procedure which does not execute, then click cancel. No matter of whether or not you have saved it in the past, the procedure reverts to its own name.

Suggested fix:
Merely have the program keep the original copy of the stored procedure and leave it unaltered until the 'Execute SQL' command fires successfully.
[20 Jun 2008 14:37] MySQL Verification Team
Thank you for the bug report.
[8 Oct 2008 13:46] Mike Lischke
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html