Not the answer you need?
Register and ask your own question!
Many Forum changes were implemented on Tue 22 Sep. Read about new Ranks, Scoring, and Reactions.
Email [email protected] for any comments or concerns.

Can percona support mysql 5.7.2's multiple triggers?

RQuadlingRQuadling EntrantCurrent User Role Beginner
Referencing https://dev.mysql.com/doc/refman/5.7/en/create-trigger.html,
As of MySQL 5.7.2, it is possible to define multiple triggers for a given table that have the same trigger event and action time. For example, you can have two BEFORE UPDATE triggers for a table. By default, triggers that have the same trigger event and action time activate in the order they were created. To affect trigger order, specify atrigger_order clause that indicates FOLLOWS or PRECEDES and the name of an existing trigger that also has the same trigger event and action time. With FOLLOWS, the new trigger activates after the existing trigger. With PRECEDES, the new trigger activates before the existing trigger.

Before MySQL 5.7.2, there cannot be multiple triggers for a given table that have the same trigger event and action time. For example, you cannot have two BEFORE UPDATE triggers for a table. But you can have a BEFORE UPDATE and a BEFORE INSERT trigger, or a BEFORE UPDATE and an AFTER UPDATE trigger.

With that, can Percona toolkit now operate appropriately with tables that already have triggers?

Comments

  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona Staff Role
    Percona Toolkit v 3.0.4 is planned to be released this week and pt-online-schema-change has a new parameter, --preserve-triggers to keep already existing triggers.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.