Comment 6 for bug 1323235

Revision history for this message
Peiran Song (peiran-song) wrote :

Reproduced on PS 5.1.68 and latest PS 5.6.17. I am not sure if this is a bug, or a corner case that unfortunately causes deadlock. So I prefer not filing an upstream bug till confirm by developer that it is indeed an unexpected(buggy) behavior.

On PS 5.1.68
------------------------
LATEST DETECTED DEADLOCK
------------------------
140625 13:39:46
*** (1) TRANSACTION:
TRANSACTION 80115, ACTIVE 0 sec, process no 24713, OS thread id 139694711215872 inserting
mysql tables in use 1, locked 1
LOCK WAIT 5 lock struct(s), heap size 1248, 4 row lock(s), undo log entries 2
MySQL thread id 291509, query id 934736 localhost 127.0.0.1 msandbox update
replace into test1 (id,uid) values('46a2c93bfc4e11e390ed001e67998d81','46a2c93bfc4e11e390ed001e67998d81')
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 6527 n bits 296 index `uk` of table `test`.`test1` trx id 80115 lock_mode X waiting
*** (2) TRANSACTION:
TRANSACTION 80116, ACTIVE 0 sec, process no 24713, OS thread id 139694707488512 inserting
mysql tables in use 1, locked 1
4 lock struct(s), heap size 1248, 3 row lock(s), undo log entries 2
MySQL thread id 291510, query id 934737 localhost 127.0.0.1 msandbox update
replace into test1 (id,uid) values('46a35d00fc4f11e390ed001e67998d81','46a35d00fc4f11e390ed001e67998d81')
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 6527 n bits 296 index `uk` of table `test`.`test1` trx id 80116 lock_mode X locks rec but not gap
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 6527 n bits 296 index `uk` of table `test`.`test1` trx id 80116 lock_mode X waiting
*** WE ROLL BACK TRANSACTION (2)

On PS 5.6.17
------------------------
LATEST DETECTED DEADLOCK
------------------------
2014-06-25 13:24:21 7f84b67fc700
*** (1) TRANSACTION:
TRANSACTION 481777, ACTIVE 0 sec inserting
mysql tables in use 1, locked 1
LOCK WAIT 5 lock struct(s), heap size 1184, 4 row lock(s), undo log entries 2
MySQL thread id 289291, OS thread handle 0x7f84bfe03700, query id 967656 localhost 127.0.0.1 msandbox update
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 6 page no 353 n bits 296 index `uk` of table `test`.`test1` trx id 481777 lock_mode X waiting
*** (2) TRANSACTION:
TRANSACTION 481776, ACTIVE 0 sec inserting
mysql tables in use 1, locked 1
4 lock struct(s), heap size 1184, 3 row lock(s), undo log entries 2
MySQL thread id 289290, OS thread handle 0x7f84b67fc700, query id 967655 localhost 127.0.0.1 msandbox update
replace into test1 (id,uid) values('23a82463fc5311e3887b001e67998d81','23a82463fc5311e3887b001e67998d81')
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 6 page no 353 n bits 296 index `uk` of table `test`.`test1` trx id 481776 lock_mode X locks rec but not gap
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 6 page no 353 n bits 296 index `uk` of table `test`.`test1` trx id 481776 lock_mode X waiting
*** WE ROLL BACK TRANSACTION (2)