Bug #28803 Multiple Triggers with the same action time and event for one table
Submitted: 31 May 2007 10:12 Modified: 30 Mar 2017 13:33
Reporter: aysegul aydin Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Stored Routines Severity:S4 (Feature request)
Version:5.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: multiple triggers

[31 May 2007 10:12] aysegul aydin
MySQL 5.0 does not support multiple triggers with the same action time and event for one table. In our application we use multiple triggers for the same table in the same action point and currently we merge all these triggers to one trigger prior to creation. It would be nice if the future versions of MySQL supports multiple triggers for the same table in the same action point.

How to repeat:
Create two triggers for the same table having same action time and event.
[4 Jun 2007 19:43] Valeriy Kravchuk
Thank you for a reasonable feature request. It is in our future plans already. Oracle RDBMS has this feature also. But do not expect it to be implemented any time soon.
[1 Apr 2009 11:25] saint bug

I am facing the same problem... 'multiple triggers with the same action time and event for one table'... Hasn't this been added yet?
[30 Mar 2017 13:33] Ståle Deraas
Posted by developer:
This FR was fixed with wl#3253
[30 Mar 2017 13:41] Paul DuBois
Posted by developer:
Noted in 5.7.2 changelog.

Previously, a table could have at most one trigger for each
combination of trigger event (INSERT, UPDATE, DELETE) and action time
(BEFORE, AFTER). This limitation has been lifted and multiple
triggers are permitted. Along with that change, several additional
modifications were made:

* By default, triggers for each combination of trigger event and action
  time execute in the order they were created. To make it possible to
  specify trigger activation order, CREATE TRIGGER now supports FOLLOWS
  and PRECEDES clauses. Each clause takes the name of an existing
  trigger that has the same trigger event and action time.

  no longer 0 but an integer greater than zero that indicates the order
  in which triggers activate.

  * Creation time for triggers is now maintained, as a TIMESTAMP(2) value
    (with a fractional part in hundredths of seconds):

  * The CREATED column in the TRIGGERS table is no longer NULL, for
    triggers created as of MySQL 5.7.2.

  * The same is true for the Created column of SHOW TRIGGERS output, and
    for the (new) Created column of SHOW CREATE TRIGGER output.

  * The tbl_name.TRG file that stores trigger information for table
    tbl_name now contains a created line with trigger creation times.

* If run against a table that has triggers, mysql_upgrade and CHECK
  TABLE ... FOR UPGRADE display this warning for each trigger created
  before MySQL 5.7.2:

  Trigger db_name.tbl_name.trigger_name does not have CREATED

  The warning is informational only. No change is made to the trigger.