February 3, 2017

How to find out / locate MySQL dead lock

See also:
SELECT * FROM information_schema.innodb_locks;
(run it as root)

| Warning | 1681 | 'INFORMATION_SCHEMA.INNODB_LOCKS' is deprecated and will be removed in a future release. |

For every blocked transaction, INNODB_LOCKS contains one row that describes each lock the transaction has requested, and for which it is waiting. INNODB_LOCKS also contains one row for each lock that is blocking another transaction, whatever the state of the transaction that holds the lock ('RUNNING''LOCK WAIT''ROLLING BACK'or 'COMMITTING'). The lock that is blocking a transaction is always held in a mode (read vs. write, shared vs. exclusive) incompatible with the mode of requested lock.

Mode of the lock. One of 'S''X''IS''IX''S,GAP''X,GAP''IS,GAP''IX,GAP', or'AUTO_INC' for shared, exclusive, intention shared, intention exclusive row locks, shared and exclusive gap locks, intention shared and intention exclusive gap locks, and auto-increment table level lock, respectively. 

See also:
InnoDB Lock Modes
Post a Comment

Featured Post

The new Dell XPS 13’s overall design is 30% thinner and lighter than its predecessor

The new Dell XPS 13 has twice the performance of the XPS 13 launched in 2015, as well as improved battery life that should enable the model...