跳至主要內容

HeChuangJun约 327 字大约 1 分钟


LATEST DETECTED DEADLOCK

2024-12-24 16:56:22 0x23d4
*** (1) TRANSACTION:
TRANSACTION 228674, ACTIVE 12 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 3 lock struct(s), heap size 1136, 2 row lock(s), undo log entries 1
MySQL thread id 19, OS thread handle 4516, query id 1188 localhost ::1 root updating
update test set uid = uid+1 where id = 2

*** (1) HOLDS THE LOCK(S):
RECORD LOCKS space id 130 page no 4 n bits 72 index PRIMARY of table test.test trx id 228674 lock_mode X locks rec but not gap
Record lock, heap no 5 PHYSICAL RECORD: n_fields 4; compact format; info bits 0

*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 130 page no 4 n bits 72 index PRIMARY of table test.test trx id 228674 lock_mode X locks rec but not gap waiting
Record lock, heap no 6 PHYSICAL RECORD: n_fields 4; compact format; info bits 0

*** (2) TRANSACTION:
TRANSACTION 228676, ACTIVE 10 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 3 lock struct(s), heap size 1136, 2 row lock(s), undo log entries 1
MySQL thread id 20, OS thread handle 3028, query id 1192 localhost ::1 root updating
update test set uid=uid+1 where id = 1

*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 130 page no 4 n bits 72 index PRIMARY of table test.test trx id 228676 lock_mode X locks rec but not gap
Record lock, heap no 6 PHYSICAL RECORD: n_fields 4; compact format; info bits 0

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 130 page no 4 n bits 72 index PRIMARY of table test.test trx id 228676 lock_mode X locks rec but not gap waiting
Record lock, heap no 5 PHYSICAL RECORD: n_fields 4; compact format; info bits 0

*** WE ROLL BACK TRANSACTION (2)