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