MySQL 5
Making an UPDATE BEFORE trigger.
I want to modify a row in the same table, but not the one that triggered the trigger. Performing an UPDATE query throws an error about not allowing that behavior (updating rows in the same table). Looked it up online and apparently MySQL locks the table, but for some reason doesn't hand that lock to the
(
Read more... )
Comments 5
Of course, if the lock doesn't expire until the procedure is complete than that's stupid.
Can you trigger the write to the secondary table from the primary, then trigger the write to the primary from the secondary using a new trigger on the secondary table?
tb
Reply
Ah well.
Reply
Reply
Anyway, I'd really avoid the approach (or do additional validation) in a high-transaction system because it violates about half of the ACID properties...
tb
Reply
Reply
Leave a comment