Home » Performance » MySQL » Triggers
Triggers [message #491] Wed, 20 December 2006 08:49 Go to previous message
Skeptical
Messages: 4
Registered: December 2006
Junior Member
Do triggers support transactions?

For example:

- In my PHP code I start a transaction which deletes a userID.
- This userID deletion leds to a cascade of records (from other records that point to the userID as foreign keys).
- In one of the cascaded record deletions, a trigger is called, which copies some info into another table.

If something along the way fails, would everything get rolled back, including the sql commands in the trigger?

Also, I've heard some people say that triggers should be avoided. Why is that?

Read Message
Read Message
Read Message
Read Message
Previous Topic:MySQL Cluster performance
Next Topic:Insert with PHP Save Record Twice
Goto Forum:

  


Current Time: Fri Jul 10 03:59:31 EDT 2009

Total time taken to generate the page: 0.02086 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.