Bug #74237 unable to save stored procedure
Submitted: 6 Oct 2014 13:50 Modified: 5 Nov 2014 1:47
Reporter: austin woz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.2.2, 6.2.3 OS:Any
Assigned to: CPU Architecture:Any
Tags: stored procedure

[6 Oct 2014 13:50] austin woz
Description:
I am unable to save stored procedures that are identified as having syntax errors.

On trying to save the stored procedure it informs me there is a syntax error with a popup, and asks if I want to continue and save. I choose to continue, but then rather than saving it tells me the scripts has no changes. It is then impossible to save the script.

It could be related, but it also renames the script by appending '_SYNTAX_ERROR' to the name. So if the script is called 'somescript' it gets automatically renamed to 'somescript_SYNTAX_ERROR'.

This is related to another bug:
http://bugs.mysql.com/bug.php?id=73804
In this bug I am told I have a syntax error and I don't. The engine is incorrectly identifying errors. i have just added another syntax error being incorrectly identified to this bug report.

How to repeat:

Create a script and save it.
edit the script and put a syntax error in it.
in my case this was with the line

SELECT CAST(343 AS UNSIGNED INTEGER)  ;

now try and save this.

I have tried this on both Mac OSX and also Windows 7 64 bit.
[6 Oct 2014 14:21] MySQL Verification Team
Hello Austin,

Thank you for the report.
Verified as described.

Thanks,
Umesh
[6 Oct 2014 14:32] MySQL Verification Team
How to repeat:

try to add a new SP:

CREATE PROCEDURE `new_procedure` ()
BEGIN

SELECT CAST(1 AS UNSIGNED INTEGER) ;

END

It, complains about syntax error but SP is created with new_procedure_SYNTAX_ERROR.. Upon refreshing SP is renamed to new_procedure.

Later, try to alter the SP - changes are not detected even after adding extra line of code.
[6 Oct 2014 14:33] MySQL Verification Team
Screenshot..

Attachment: 74237.png (image/png, text), 53.97 KiB.

[5 Nov 2014 1:47] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.2.4 release, and here's the changelog entry:

´╗┐Stored procedures that were identified as having syntax errors could
not be saved.

Thank you for the bug report.