02 April 2005

MySQL 5.0 “Triggers”

Just a quick note here after looking over this article about MySQL 5’s triggers while I was trying to find their “download the source” page. Apparently from inside a MySQL 5 trigger you can’t access information from any table. This basically reduces these “triggers” to being a local constraint; local because trying to do things with foreign keys would require a SELECT which is, of course, forbidden.

And there’s one more thing, don’t alter a table with triggers. It will crash your database. And triggers won’t be fired if there is a NOT NULL column. And a handful of other problems that they are working on right now. I’m sure they’ll get the hang of it eventually.

Yes, I usually use something else and it has a few of its own obscure problems with triggers.

No comments: