Bug #52743 forward enginer sql create script - drop procedure statement - no colon
Submitted: 11 Apr 2010 4:28 Modified: 19 Apr 2010 12:52
Reporter: David Fidge Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.17 OSS beta OS:Windows
Assigned to: Alexander Musienko CPU Architecture:Any

[11 Apr 2010 4:28] David Fidge
Description:
When doing forward engineer create script, the generated script does not post-fix "DROP procedure IF EXISTS.." statements with a colon (;).  This causes SQL syntax errors.  I'm working with mysql server 5.0.89.  

How to repeat:
Make a new project
Create a new stored procedure (can be blank)
File->Export->Forward Engineer SQL Create Script
Check "Generate DROP Statements before each create statement"
Next
Next
In the text you'll see:
DROP procedure IF EXISTS `mydb`.`routine1` 
This SHOULD be:
DROP procedure IF EXISTS `mydb`.`routine1` ;   

Suggested fix:
Add colon at end of DROP procedure statements.
[12 Apr 2010 10:07] Johannes Taxacher
fix confirmed in repository
[19 Apr 2010 12:52] Tony Bedford
An entry has been added to the 5.2.18 changelog:

When using the Forward Engineer SQL Script wizard, the wizard did not terminate DROP procedure IF EXISTS statements with a semi-colon. This caused SQL syntax errors if the script was executed on a server.