Bug #37432 Issue in exporting trigger DDL from Workbench
Submitted: 16 Jun 2008 18:52 Modified: 10 Jul 2008 15:22
Reporter: Chen-Hsiao Shih Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.22 OS:Microsoft Windows (Windows XP)
Assigned to: CPU Architecture:Any
Triage: D3 (Medium)

[16 Jun 2008 18:52] Chen-Hsiao Shih
Description:
I just tried to export all objects and the trigger DDL's were generated.

Original description in Forum:

================================================================================
Hi, 

I am having a problem in exporting Trigger DDL from Workbench. Two triggers are defined for one of my table but none of them are able to export. I have to do copy&paste to another text editor. When I have in my export window is as following: 

1. None of SQL option is selected 
2. Speicified a output file 
3. Object of type MySQL Trigger is the only object to export 
4. In Detailed Selection, there are three items. Besides my two triggers, the other one indicates syntax error. The error object is ON the EXCLUSION list. 

The export file is empty beside 6-line codes for initializing/reverting environment. However, all the trigger codes are proven to work; ie, I maunually copied/pasted them onto MySQL Client window without any syntax errors and both worked perfect for my purpose. 

I had similar experience with this kind of error objects in routine editor. At that time, a error oejct wouldn't go away during exporting no matter what I did, even after removed the whole routine group, created a new one and pasted error-free codes. Finally, I found the error object existed in the Routines category under MySQL Model and removed it successfully. 

However, I had the same problem with Trigger now. But, is there any similar way to remove the error object? I suspect it prohibits me from exporting trigger script. Thanks in advance!

How to repeat:
One of the way:

1. Select File -> Export -> Forward Engineer SQL CREATE Script
2. Specify a file and click "Next"
3. Deselect other SQL objects for export, except Trigger
4. Click "detailed selection"
5. Select "SystemDB.SYNTAX_ERROR_1" and click ">"
6. Click Finish
[20 Jun 2008 14:55] Miguel Solorzano
Thank you for the bug report.
[23 Jun 2008 20:50] Johannes Taxacher
this issue has been fixed whil working on another issue. fixx will be in 5.0.23
[10 Jul 2008 15:22] Tony Bedford
An entry has been added to the 5.0.23 changelog:

Workbench was failing to correctly export Trigger DDLs.