MySQL 5.5 Reference Manual Including MySQL NDB Cluster 7.2 Reference Guide

21.29.8 The INFORMATION_SCHEMA INNODB_TRX Table

The INNODB_TRX table provides information about every transaction currently executing inside InnoDB, including whether the transaction is waiting for a lock, when the transaction started, and the SQL statement the transaction is executing, if any.

For usage information, see Section 14.18.2.1, “Using InnoDB Transaction and Locking Information”.

The INNODB_TRX table has these columns:

Example

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX\G
*************************** 1. row ***************************
                    trx_id: 3B7
                 trx_state: RUNNING
               trx_started: 2014-11-19 14:33:45
     trx_requested_lock_id: NULL
          trx_wait_started: NULL
                trx_weight: 1
       trx_mysql_thread_id: 2
                 trx_query: SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX
       trx_operation_state: NULL
         trx_tables_in_use: 0
         trx_tables_locked: 0
          trx_lock_structs: 1
     trx_lock_memory_bytes: 376
           trx_rows_locked: 0
         trx_rows_modified: 0
   trx_concurrency_tickets: 0
       trx_isolation_level: REPEATABLE READ
         trx_unique_checks: 1
    trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULL
 trx_adaptive_hash_latched: 0
 trx_adaptive_hash_timeout: 10000
*************************** 2. row ***************************
                    trx_id: 3B6
                 trx_state: RUNNING
               trx_started: 2014-11-19 14:32:38
     trx_requested_lock_id: NULL
          trx_wait_started: NULL
                trx_weight: 94055
       trx_mysql_thread_id: 1
                 trx_query: DELETE FROM employees.salaries WHERE salary > 75000
       trx_operation_state: updating or deleting
         trx_tables_in_use: 1
         trx_tables_locked: 1
          trx_lock_structs: 841
     trx_lock_memory_bytes: 129464
           trx_rows_locked: 392752
         trx_rows_modified: 93214
   trx_concurrency_tickets: 0
       trx_isolation_level: REPEATABLE READ
         trx_unique_checks: 1
    trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULL
 trx_adaptive_hash_latched: 0
 trx_adaptive_hash_timeout: 10000

Notes