cxm.cm 发表于 2016-02-26 17:52

mysql 死锁问题分析

------------------------
LATEST DETECTED DEADLOCK
------------------------
2016-02-26 11:10:05 7f07d410b700
*** (1) TRANSACTION:
TRANSACTION 23536, ACTIVE 0 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 6 lock struct(s), heap size 1184, 4 row lock(s), undo log entries 3
MySQL thread id 117296, OS thread handle 0x7f07d4313700, query id 443847 ******** yxuser updating
UPDATE camp_resource_definition SET
                count_used = count_used + 1
                WHEREyhq_id = 'QBYI20160225202847000466'
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 72 page no 3 n bits 80 index `PRIMARY` of table `yxdb`.`camp_resource_definition` trx id 23536 lock_mode X waiting
*** (2) TRANSACTION:
TRANSACTION 23534, ACTIVE 0 sec starting index read
mysql tables in use 1, locked 1
6 lock struct(s), heap size 1184, 9 row lock(s), undo log entries 11
MySQL thread id 116547, OS thread handle 0x7f07d410b700, query id 443869 ***** **** Searching rows for update
update camp_num_seq set serial_id = last_insert_id(serial_id + 10)
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 72 page no 3 n bits 80 index `PRIMARY` of table `yxdb`.`camp_resource_definition` trx id 23534 lock_mode X
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 68 page no 3 n bits 72 index `PRIMARY` of table `yxdb`.`camp_num_seq` trx id 23534 lock_mode X waiting
*** WE ROLL BACK TRANSACTION (1)
------------
该如何分析死锁的问题

lyhabc 发表于 2016-02-26 22:24

TRANSACTION 23536,
MySQL thread id 117296,

cxm.cm 发表于 2016-02-29 10:19

回复 2# lyhabc


能否说详细说下吗,不明白这个


   

action08 发表于 2016-03-01 09:22

RECORD LOCKS space id 72 page no 3 n bits 80 index `PRIMARY` of table `yxdb`.`camp_resource_definition` trx id 23536 lock_mode X waiting
页: [1]
查看完整版本: mysql 死锁问题分析