Obviously this is good advice in the general case, but it's slighly moot for the OP, who said he was on MySQL. It's impossible to get deadlock in MySQL as you have to declare all your locks at once .. declaring a new lock after that will free your current one.
Tony
| [reply] |
Really?
Remind me to avoid having to rely on MySQL for anything I
care about then. Of course they don't understand
ACID,
which makes them a poor fit for a lot of areas. OTOH it
gives them good performance, and it is "good enough" for
many things.
But the inflexible locking policy would be a problem for
me.
| [reply] |
Interesting. Bearing in mind the lack of transactions1, under what circumstances would you ever need to grab a lock on a second table having already taken a lock on a first table?
Just curious. I've never encountered a need for this, and can't think of anything off-hand...
Thanks,
Tony
1. yes, I know that recent MySQLs handle transactions.
| [reply] |