mysql死锁原因完全看不懂了,求解

本帖最后由 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)
标签: 暂无标签
anfin

写了 3 篇文章,拥有财富 57,被 2 人关注

转播转播 分享分享 分享淘帖
回复

使用道具

P4 | 发表于 2016-1-19 15:41:58
冷了好久没人回复,呜呜~
回复

使用道具

P4 | 发表于 2016-10-28 11:57:04
我也是新手,不好意思,帮不到你
回复

使用道具

您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

意见
反馈