Re: please help reading DB deadlock notice

2007-04-03 Thread Maciej Dobrzanski
"Nikita Tovstoles" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Do both of your SELECT statements use the same index (`token`) when setting locks on the rows? My guess is that the situation is as follows. TX2: SELECT ... WHERE id = ... FOR UPDATE TX2 sets an exclusive lock for a ro

please help reading DB deadlock notice

2007-04-02 Thread Nikita Tovstoles
Hi, I'd really appreciate help with reading this db deadlock notice. Essentially, I'd like to understand: -what holds the lock that TX2 is waiting on index `token` of table `eviltwin/user_sessions`? I thought it'd be TX1 (hence deadlock ?), yet it appears that TX1 holds no locks -if the an