Bug #97344 MySQL Workbench only allows one trigger per event and action time.
Submitted: 23 Oct 2019 14:45 Modified: 24 Oct 2019 12:36
Reporter: Oliver Chattlesworth Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S7 (Test Cases)
Version:8.0.18 OS:Microsoft Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[23 Oct 2019 14:45] Oliver Chattlesworth
Description:
MySQL Workbench only allows the creation of one BEFORE INSERT, AFTER INSERT, BEFORE UPDATE, AFTER UPDATE, BEFORE DELETE, AFTER DELETE trigger at a time.

How to repeat:
Create more than one BEFORE INSERT trigger for a table using MySQL Workbench.  Upon clicking apply to commit the changes to the server you get the following error:

Executing:
DROP TRIGGER IF EXISTS `test`.`tbl_vendor_BEFORE_UPDATE`;

DELIMITER $$
USE `test`$$
CREATE DEFINER = CURRENT_USER TRIGGER `test`.`tbl_vendor_BEFORE_UPDATE` BEFORE UPDATE ON `tbl_vendor` FOR EACH ROW FOLLOWS `tbl_vendor_MODIFIEDBY`
$$
DELIMITER ;

Operation failed: There was an error while applying the SQL script to the database. ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SQL Statement:
CREATE DEFINER = CURRENT_USER TRIGGER `test`.`tbl_vendor_BEFORE_UPDATE` BEFORE UPDATE ON `tbl_vendor` FOR EACH ROW FOLLOWS `tbl_vendor_MODIFIEDBY`

There is no error in the SQL syntax and if the two triggers are combined into a single trigger the commit succeeds.
[23 Oct 2019 14:50] Oliver Chattlesworth
Creating two triggers doesn't work

Attachment: MySQL Bug 1.png (image/png, text), 8.26 KiB.

[23 Oct 2019 14:51] Oliver Chattlesworth
Creating one trigger works

Attachment: MySQL Bug 2.png (image/png, text), 7.70 KiB.

[24 Oct 2019 12:36] Umesh Shastry
Hello Oliver Chattlesworth,

Thank you for the report and feedback.

regards,
Umesh