Contains information about every transaction currently executing inside InnoDB, including whether the transaction is waiting for a lock, when the transaction started, and the particular SQL statement the transaction is executing.

Table 6.3. INNODB_TRX Columns

Column nameDescription
TRX_IDUnique transaction ID number, internal to InnoDB.
TRX_WEIGHTThe weight of a transaction, reflecting (but not necessarily the exact count of) the number of rows altered and the number of rows locked by the transaction. To resolve a deadlock, InnoDB selects the transaction with the smallest weight as the victim to rollback. Transactions that have changed non-transactional tables are considered heavier than others, regardless of the number of altered and locked rows.
TRX_STATETransaction execution state. One of 'RUNNING', 'LOCK WAIT', 'ROLLING BACK' or 'COMMITTING'.
TRX_STARTEDTransaction start time; the transaction is created by executing a transactional query.
TRX_REQUESTED_LOCK_IDID of the lock the transaction is currently waiting for (if TRX_STATE is 'LOCK WAIT', otherwise NULL). Details about the lock can be found by joining with INNODB_LOCKS on LOCK_ID.
TRX_WAIT_STARTEDTime when the transaction started waiting on the lock (if TRX_STATE is 'LOCK WAIT', otherwise NULL).
TRX_MYSQL_THREAD_IDMySQL thread ID. Can be used for joining with PROCESSLIST on ID. See Section 6.4.3, “Possible Inconsistency with PROCESSLIST.
TRX_QUERYThe SQL query that is being executed by the transaction.

User Comments
Sign Up Login You must be logged in to post a comment.