Bug #51728 Sync randomly adds malformed statements in between a trigger
Submitted: 4 Mar 2010 16:07 Modified: 26 Mar 2010 11:21
Reporter: Jeremy Wilson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2 OS:Any (Win7, Linux)
Assigned to: Alexander Musienko CPU Architecture:Any

[4 Mar 2010 16:07] Jeremy Wilson
Description:
As an intermittent problem, occasionally when performing a sync, between two triggers, unexpected "USE" statements and a comment "-- Trigger DDL Statements" appears. This is intermittent and does not always happen, but causes a syntax error in the script.

This happens in both the latest SE and the beta OSS.

How to repeat:
The following is what is generated by the sync;

[ending trigger...]
END$$

USE `localhost_app_webpt_com`$$
-- Trigger DDL Statements
USE `localhost_app_webpt_com`;
DELIMITER $$

USE `localhost_app_webpt_com`$$
[beginning trigger...]

I have attached the full version as a file to this report.
[4 Mar 2010 16:39] Jeremy Wilson
in the same degree, on a forward engineer of another database I have, I am getting a similar malformation in between procedures whcih also generates sql syntax errors;

[ending procedure...]
END
$$
DELIMITER ;
;
$$
SHOW WARNINGS$$
[starting procedure...]
[5 Mar 2010 7:00] Susanne Ebrecht
Many thanks for writing a bug report.

Verified just as described.
[24 Mar 2010 22:26] Johannes Taxacher
fix confirmed in repository
[26 Mar 2010 11:21] Tony Bedford
An entry has been added to the 5.2.17 changelog:

When synchronizing between two triggers, unexpected USE statements and the comment “-- Trigger DDL Statements” appeared intermittently. This caused a syntax error in the script.