Skip to content

Instantly share code, notes, and snippets.

@mitkot
Created February 3, 2017 10:52
Show Gist options
  • Save mitkot/cf0ac8767b10d02935e711df25caa51f to your computer and use it in GitHub Desktop.
Save mitkot/cf0ac8767b10d02935e711df25caa51f to your computer and use it in GitHub Desktop.
Show locks information for InnoDB
select t.trx_mysql_thread_id
, t.trx_state
, t.trx_started
, t.trx_isolation_level
, p.HOST host
, p.TIME seconds
, p.INFO query
from information_schema.INNODB_TRX t
inner join information_schema.PROCESSLIST p
on t.trx_mysql_thread_id = p.ID
\G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment