Trigger Limitations

You are viewing an old version of this article. View the current version here.

Contents

  1. See Also

The following restrictions apply to triggers.

  • All of the restrictions listed in Stored Routine Limitations.
  • All of the restrictions listed in Stored Function Limitations.
  • Until MariaDB 10.2.3, 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 are always executed for each row. The standard FOR EACH STATEMENT option is not supported in MariaDB,
  • 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.
  • By default, with row-based replication, triggers run on the master, and the effects of their executions are replicated to the slaves. However, starting from MariaDB 10.1.1, it is possible to run triggers on the slaves. See Running triggers on the slave for Row-based events.

See Also

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.