InnoDB INFORMATION_SCHEMA Transaction and Locking Information SELECT r.trx_id waiting_trx_id, r.trx_mysql_thread_id waiting_thread, r.trx_query waiting_query, b.trx_id blocking_trx_id, b.trx_mysql_thread_id blocking_thread, b.trx_query blocking_query FROM performance_schema.data_lock_waits w INNER JOIN information_schema.innodb_trx b ON b.trx_id = w.blocking_engine_transaction_id INNER JOIN information_schema.innodb_trx r ON r.trx_id = w.requesting_engine_transaction_id; SELECT waiting_trx_id, waiting_pid, waiting_query, blocking_trx_id, blocking_pid, blocking_query FROM sys.innodb_lock_waits; Or, more simply, use the  sys  schema  innodb_lock_waits  view: If a NULL value is reported for the blocking query, see Identifying a Blocking Query After the Issuing Session Becomes Idle. In the preceding table, you can identify sessions by the “waiting query”  or “blocking query”  columns. As you can see: You can see the underlying data in the  INFORMATION_SCHEMA INNODB_TRX  table and Performance Schema  data_locks  and  data_lock_waits  tables. The following table shows some sample contents of the  INNODB_TRX  table. •Session B (trx id  A4 , thread  6 ) and Session C (trx id  A5 , thread  7 ) are both waiting for Session A (trx id A3 , thread  5 ). •Session C is waiting for Session B as well as Session A. waiting trx id waiting thread waiting query blocking trx id blocking thread blocking query A4 6 SELECT b FROM t FOR UPDATE A3 5 SELECT SLEEP(100) A5 7 SELECT c FROM t FOR UPDATE A3 5 SELECT SLEEP(100) A5 7 SELECT c FROM t FOR UPDATE A4 6 SELECT b FROM t FOR UPDATE trx id trx state trx started trx requested lock id trx wait started trx weight trx mysql thread id trx query A3 RUNNING 2008-01-15 16:44:54 NULL NULL 2 5 SELECT SLEEP(100) 3302