3

MySQL死锁案例分析(三)

 3 years ago
source link: https://www.wencst.com/archives/822
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 13:04:28 0x7f9a34469700
*** (1) TRANSACTION:
TRANSACTION 3045094, ACTIVE 11 sec inserting
mysql tables in use 1, locked 1
LOCK WAIT 4 lock struct(s), heap size 1136, 3 row lock(s), undo log entries 1
MySQL thread id 92021, OS thread handle 140299565065984, query id 3120391 127.0.0.1 root update
insert into tu (c1,c2,c3) values(2,1,2)
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 240 page no 6 n bits 72 index uniq_c2 of table `db01`.`tu` trx id 3045094 lock_mode X insert intention waiting
*** (2) TRANSACTION:
TRANSACTION 3045095, ACTIVE 8 sec inserting, thread declared inside InnoDB 5000
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 3120434 127.0.0.1 root update
insert into tu (c1,c2,c3) values(2,1,2)
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 240 page no 6 n bits 72 index uniq_c2 of table `db01`.`tu` trx id 3045095 lock_mode X
*** (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 3045095 lock mode S waiting
*** WE ROLL BACK TRANSACTION (2)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK