每个人生的当口,都是会有一个孤独的时刻,四顾无人,只有自己,于是不得不看明白自己的脆弱,自己的欲望,自己的念想,自己的界限,还有,自己真正的梦想。
分类: Mysql/postgreSQL
2016-05-11 11:14:03
原文地址:[HowTo]-死锁 作者:ning_lianjie
参考<<高性能MySQL>>
问题分析
附:
死锁信息
登录MySQL执行SHOW ENGINE INNODB STATUS\G命令 ... LATEST DETECTED DEADLOCK ------------------------ 121029 14:46:44 -- 死锁发生的时间 *** (1) TRANSACTION: TRANSACTION 1B02B0FAC, ACTIVE 5 sec fetching rows mysql tables in use 1, locked 1 LOCK WAIT 86 lock struct(s), heap size 14776, 11642 row lock(s), undo log entries 1436 MySQL thread id 51989134, OS thread handle 0x6482b940, query id 37321665747 ......-- 第(1)个事务信息 *** (1) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 17689 page no 1606 n bits 760 ......
lock_mode X waiting -- 第(1)个事务等待的锁 *** (2) TRANSACTION: TRANSACTION 1B02B2776, ACTIVE 0 sec fetching rows, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 4 lock struct(s), heap size 1248, 11 row lock(s) MySQL thread id 51984598, OS thread handle 0x6d9a8940, query id 37321665253 ......-- 第(2)个事务状态 *** (2) HOLDS THE LOCK(S): RECORD LOCKS space id 17689 page no 1606 n bits 760 index ...... -- 第(2)个事务持有的锁:该锁就是第(1)个事务在等待的. *** (2) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 17689 page no 1606 n bits 760 index ...... -- 第(2)个事务等待的锁. *** WE ROLL BACK TRANSACTION (2) -- 回滚了第(2)个事务 ...