9

MySQL死锁案例分析(二)

 3 years ago
source link: https://www.wencst.com/archives/820
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.
neoserver,ios ssh client

二、死锁输出

2018-03-25 12:20:16 0x7f9a34469700
*** (1) TRANSACTION:
TRANSACTION 3044459, ACTIVE 7 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 92021, OS thread handle 140299577640704, query id 3114328 127.0.0.1 root updating
update t set c2=8 where c1=5
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 232 page no 3 n bits 80 index PRIMARY of table `db01`.`t` trx id 3044459 lock_mode X locks rec but not gap waiting
*** (2) TRANSACTION:
TRANSACTION 3044456, ACTIVE 14 sec updating or deleting, thread declared inside InnoDB 4999
mysql tables in use 1, locked 1
3 lock struct(s), heap size 1136, 2 row lock(s), undo log entries 1
MySQL thread id 92050, OS thread handle 140300278732544, query id 3114329 127.0.0.1 root updating
delete from t where  id=30
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 232 page no 3 n bits 80 index PRIMARY of table `db01`.`t` trx id 3044456 lock_mode X locks rec but not gap
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 232 page no 4 n bits 80 index idx_c1 of table `db01`.`t` trx id 3044456 lock_mode X locks rec but not gap waiting
*** WE ROLL BACK TRANSACTION (1)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK