The following restrictions apply to triggers.

  • All of the restrictions listed in Stored Routine Limitations.
  • All of the restrictions listed in Stored Function Limitations.
  • Each table can have only one trigger for each timing/event combination (ie: you can't define two BEFORE INSERT triggers for the same table).
  • Triggers cannot operate on any tables in the mysql, information_schema or performance_schema database.
  • Cannot return a resultset.
  • The RETURN statement is not permitted, since triggers don't return any values. Use LEAVE to immediately exit a trigger.
  • Triggers are not activated by foreign key actions.
  • If a trigger is loaded into cache, it is not automatically reloaded when the table metadata changes. In this case a trigger can operate using the outdated metadata.
  • In replication, triggers on a slave are only activated by master statements if statement-based replication is used, not row-based replication. See Binary Log Formats for more on the statement-based and row-based formats.


Comments loading...