8

MySQL死锁案例分析(四)

 3 years ago
source link: https://www.wencst.com/archives/824
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

二、死锁输出

2018-03-26 13:34:48 0x7f9a34407700
*** (1) TRANSACTION:
TRANSACTION 3055184, ACTIVE 3180 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 3 lock struct(s), heap size 1136, 2 row lock(s)
MySQL thread id 98706, OS thread handle 140299540100864, query id 3302239 127.0.0.1 root updating
update tu set c3=5 where c1=4
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 240 page no 5 n bits 72 index uniq_c1 of table `db01`.`tu` trx id 3055184 lock_mode X locks rec but not gap waiting
*** (2) TRANSACTION:
TRANSACTION 3055185, ACTIVE 3176 sec starting index read, thread declared inside InnoDB 5000
mysql tables in use 1, locked 1
3 lock struct(s), heap size 1136, 2 row lock(s)
MySQL thread id 98707, OS thread handle 140300278331136, query id 3302240 127.0.0.1 root updating
update tu set c3=5 where c1=4
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 240 page no 5 n bits 72 index uniq_c1 of table `db01`.`tu` trx id 3055185 lock mode S
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 240 page no 5 n bits 72 index uniq_c1 of table `db01`.`tu` trx id 3055185 lock_mode X locks rec but not gap waiting
*** WE ROLL BACK TRANSACTION (2)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK