Bug #36815 auto formatting trigger cause SYNTAX_ERROR_1
Submitted: 20 May 2008 11:37 Modified: 28 May 2008 23:54
Reporter: Hu Hailin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.21 OSS OS:Windows
Assigned to: Sergei Tkachenko CPU Architecture:Any
Tags: trigger

[20 May 2008 11:37] Hu Hailin
Description:
the code tidied up automatically will cause SYNTAX_ERROR_1 error, which would make the sql script exported unexpected.

How to repeat:
create a trigger

-- Trigger DDL Statements
USE mydb;
DELIMITER //

CREATE TRIGGER
...(whatever)
END;//

pull down the Triggers bar of the table where show the trigger's name correctly. reopen the table editor (which is opened after double click a table), you can see the code is tidied up like this (pay attention to the last line)

-- Trigger DDL Statements
USE mydb;
DELIMITER //

CREATE TRIGGER
...(whatever)
END;
//

focus your mouse out of the table editor, then the place where the trigger's name was displayed would show SYNTAX_ERROR_1
[21 May 2008 10:21] Sergei Tkachenko
Fixed.
[21 May 2008 21:30] Johannes Taxacher
fixed. tested in bzr rev. 3111
[28 May 2008 23:54] Paul DuBois
Noted in 5.0.21 changelog.

Trigger definition auto-formatting resulted in malformed code.
[28 May 2008 23:56] Paul DuBois
Make that: 5.0.22 changelog.
[27 Jun 2008 12:00] MySQL Verification Team
Bug: http://bugs.mysql.com/bug.php?id=37685 has been marked as duplicate of this one.