本帖最后由 anfin 于 2015-12-4 14:26 编辑
err 看到的日志如下,看不懂死锁原因,求解析:
TRANSACTION 544031828, ACTIVE 0 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 15 lock struct(s), heap size 2936, 13 row lock(s), undo log entries 8
MySQL thread id 2591, OS thread handle 0x7f8972619700, query id 185924765 192.168.0.32 ysb statistics
select * from ts_wholesale_goods where id='27552' for update
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 1698 page no 3132 n bits 96 index `PRIMARY` of table `db1`.`ts_wholesale_goods` trx id 544031828 lock_mode X locks rec but not gap waiting
Record lock, heap no 12 PHYSICAL RECORD: n_fields 63; compact format; info bits 0
0: len 4; hex 80006ba0; asc k ;;
略。。。。
*** (2) TRANSACTION:
TRANSACTION 544031830, ACTIVE 0 sec starting index read
mysql tables in use 1, locked 1
6 lock struct(s), heap size 1184, 4 row lock(s), undo log entries 2
MySQL thread id 208066, OS thread handle 0x7f897271d700, query id 185924777 192.168.0.32 ysb statistics
select * from ts_wholesale_goods where id='27551' for update
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 1698 page no 3132 n bits 96 index `PRIMARY` of table `db1`.`ts_wholesale_goods` trx id 544031830 lock_mode X locks rec but not gap
Record lock, heap no 12 PHYSICAL RECORD: n_fields 63; compact format; info bits 0
0: len 4; hex 80006ba0; asc k ;;
略。。。。
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 1698 page no 3132 n bits 96 index `PRIMARY` of table `db1`.`ts_wholesale_goods` trx id 544031830 lock_mode X locks rec but not gap waiting
Record lock, heap no 11 PHYSICAL RECORD: n_fields 63; compact format; info bits 0
0: len 4; hex 80006b9f; asc k ;;
略。。。。
*** WE ROLL BACK TRANSACTION (2)
|
|