Bug #41340 Add trigger validation/corretcion
Submitted: 9 Dec 2008 20:46 Modified: 5 Feb 2013 14:54
Reporter: Alexander Musienko Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: trigger, Validation

[9 Dec 2008 20:46] Alexander Musienko
Description:
Apparently in this version of the workbench I just installed today, 5.0.28se, when it's parsing the trigger sql block, it's become case sensitive on the table name. In the mysql model tab, I had the table named WO_Line, notice the caps. In my sql for the trigger, the trigger syntax is 'on wo_line' in my code - all lower case. The workbench then put a new table name in the mysql model tab, so I had table 'WO_Line' with all my all my columns and foreign keys etc and table 'wo_line' with the trigger sql and nothing else. When the script was created, it made a create statement for table wo_line with no columns or anything else which errored out.

I went back and changed the capitalization in the code and deleted the lower case table name in the mysql model tab and it worked fine, but I'd say paying attention to capitalization in table names in sql code is a bug.

How to repeat:
Use wrong table name in trigger.
[26 Jan 2009 18:02] Bastian Grupe
I am able to reproduce this myself. It is quite painful if you change some schema names. It seems that for each edit you do to the trigger tab, some ghost triggers are created (in my case 3) which show in the export wizard but cannot be easily selected in the schema.
[5 Feb 2013 14:54] Alfredo Kojima
Closed as confirmed by filer.