In this post we’ll review how MySQL triggers can affect queries.
Contrary to what the documentation states, we can activate triggers even while operating on views:
https://dev.mysql.com/doc/refman/5.7/en/triggers.html
Important: MySQL triggers activate only for changes made to tables by SQL statements. They do not activate for changes in views, nor by changes to tables made by APIs that do not transmit SQL statements to the MySQL server.
Be on the lookout if you use and depend on triggers, since it’s not the case for updatable views! We have reported a documentation bug for this but figured it wouldn’t hurt to mention this as a short blog post, too. The link to the bug in question is here:
…[Read more]