Bug #65982 Dose not work TRIGGER sync or forward engineer
Submitted: 23 Jul 2012 5:24 Modified: 4 Dec 2012 19:28
Reporter: Kho Kwang Jin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.40 OS:Microsoft Windows (Windows XP pro SP3)
Assigned to: CPU Architecture:Any
Tags: forward engineer, sync, trigger

[23 Jul 2012 5:24] Kho Kwang Jin
Description:
Trigger synchronization errors are occurring in most versions.
※ MySQL Workbench 5.2.x

Expect that the error has not the new version, but still error occurs.
※ This version ( MySQL Workbench 5.2.40 )

Forward Engineer command is also a trigger-generated errors still occur.

When synchronize, some are excluded. is a random or fixed.

How to repeat:
[MySQL Workbench ERD File]
http://livebee.kr/Workbench/trigger_test.mwb

[Test step images]
http://livebee.kr/Workbench/Step_01_Edit_TRIGGER.png
http://livebee.kr/Workbench/Step_02_Sync_TRIGGER.png
http://livebee.kr/Workbench/Step_03_Sync_TRIGGER.png
http://livebee.kr/Workbench/Step_04_Sync_TRIGGER.png
http://livebee.kr/Workbench/Step_05_Forward_Engineer.png
http://livebee.kr/Workbench/Step_06_Forward_Engineer.png
http://livebee.kr/Workbench/Step_07_Forward_Engineer.png
http://livebee.kr/Workbench/Step_08_Forward_Engineer.png
http://livebee.kr/Workbench/Step_09_Forward_Engineer.png
http://livebee.kr/Workbench/Step_10_Forward_Engineer.png
http://livebee.kr/Workbench/Step_11_Add_DROP_TRIGGER.png
http://livebee.kr/Workbench/Step_12_Add_DROP_TRIGGER.png
http://livebee.kr/Workbench/Step_13_Add_DROP_TRIGGER.png
http://livebee.kr/Workbench/Step_14_Add_DROP_TRIGGER.png
http://livebee.kr/Workbench/Step_15_Add_DROP_TRIGGER.png
http://livebee.kr/Workbench/Step_16_Add_DROP_TRIGGER.png
http://livebee.kr/Workbench/Step_17_Add_DROP_TRIGGER.png

Suggested fix:
add DROP TRIGGER query before CREATE TRIGGER query
[23 Jul 2012 6:03] Valeriy Kravchuk
I do not see any triggers in the .mwb file you referred to. Is this intentional?
[23 Jul 2012 7:33] Kho Kwang Jin
it's my mistake. just reupload .mwb file
[23 Jul 2012 7:34] Kho Kwang Jin
MySQL Workbench File

Attachment: trigger_test.mwb (application/octet-stream, text), 5.35 KiB.

[23 Jul 2012 7:35] Kho Kwang Jin
Step - 01 - Edit TRIGGER

Attachment: Step - 01 - Edit TRIGGER.png (image/png, text), 16.60 KiB.

[23 Jul 2012 7:35] Kho Kwang Jin
Step - 02 - Sync TRIGGER

Attachment: Step - 02 - Sync TRIGGER.png (image/png, text), 55.36 KiB.

[23 Jul 2012 7:35] Kho Kwang Jin
Step - 03 - Sync TRIGGER

Attachment: Step - 03 - Sync TRIGGER.png (image/png, text), 55.45 KiB.

[23 Jul 2012 7:36] Kho Kwang Jin
Step - 04 - Sync TRIGGER

Attachment: Step - 04 - Sync TRIGGER.png (image/png, text), 55.42 KiB.

[23 Jul 2012 7:36] Kho Kwang Jin
Step - 05 - Forward Engineer

Attachment: Step - 05 - Forward Engineer.png (image/png, text), 45.06 KiB.

[23 Jul 2012 7:36] Kho Kwang Jin
Step - 06 - Forward Engineer

Attachment: Step - 06 - Forward Engineer.png (image/png, text), 50.28 KiB.

[23 Jul 2012 7:36] Kho Kwang Jin
Step - 07 - Forward Engineer

Attachment: Step - 07 - Forward Engineer.png (image/png, text), 48.54 KiB.

[23 Jul 2012 7:36] Kho Kwang Jin
Step - 08 - Forward Engineer

Attachment: Step - 08 - Forward Engineer.png (image/png, text), 47.46 KiB.

[23 Jul 2012 7:36] Kho Kwang Jin
Step - 09 - Forward Engineer

Attachment: Step - 09 - Forward Engineer.png (image/png, text), 47.18 KiB.

[23 Jul 2012 7:36] Kho Kwang Jin
Step - 10 - Forward Engineer

Attachment: Step - 10 - Forward Engineer.png (image/png, text), 46.68 KiB.

[23 Jul 2012 7:37] Kho Kwang Jin
Step - 11 - Add DROP TRIGGER

Attachment: Step - 11 - Add DROP TRIGGER.png (image/png, text), 18.42 KiB.

[23 Jul 2012 7:37] Kho Kwang Jin
Step - 12 - Add DROP TRIGGER

Attachment: Step - 12 - Add DROP TRIGGER.png (image/png, text), 54.40 KiB.

[23 Jul 2012 7:37] Kho Kwang Jin
Step - 13 - Add DROP TRIGGER

Attachment: Step - 13 - Add DROP TRIGGER.png (image/png, text), 54.43 KiB.

[23 Jul 2012 7:37] Kho Kwang Jin
Step - 14 - Add DROP TRIGGER

Attachment: Step - 14 - Add DROP TRIGGER.png (image/png, text), 54.33 KiB.

[23 Jul 2012 7:37] Kho Kwang Jin
Step - 15 - Add DROP TRIGGER

Attachment: Step - 15 - Add DROP TRIGGER.png (image/png, text), 50.82 KiB.

[23 Jul 2012 7:37] Kho Kwang Jin
Step - 16 - Add DROP TRIGGER

Attachment: Step - 16 - Add DROP TRIGGER.png (image/png, text), 43.97 KiB.

[23 Jul 2012 7:37] Kho Kwang Jin
Step - 17 - Add DROP TRIGGER

Attachment: Step - 17 - Add DROP TRIGGER.png (image/png, text), 42.67 KiB.

[15 Aug 2012 14:26] Armando Lopez Valencia
Thanks for your report Kho.
Verified in:
Windows 7x64
WB 5.2.42 rev 9752
Even when the drop sentences are now created, the empty trigger in the sync screen is still reproducible.
[4 Dec 2012 19:28] Philip Olson
Fixed as of the upcoming MySQL Workbench 5.2.45, and here's the changelog entry:

While executing the "Synchronize Model with Database" wizard, invalid
trigger related errors could be emitted even though the definitions were
correct.

Thank you for the bug report.