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 name | Description |
---|---|
TRX_ID
|
Unique transaction ID number, internal to InnoDB. |
TRX_WEIGHT
|
The 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_STATE
|
Transaction execution state. One of 'RUNNING' ,
'BLOCKED' , 'ROLLING BACK' or 'COMMITTING' .
|
TRX_STARTED
|
Transaction start time; the transaction is created by executing a transactional query. |
TRX_REQUESTED_LOCK_ID
|
ID of the lock the transaction is currently waiting
for (if TRX_STATE is 'BLOCKED' ,
otherwise NULL ). Details about the lock can be found
by joining with INNODB_LOCKS on LOCK_ID .
|
TRX_WAIT_STARTED
|
Time when the transaction started waiting on the lock
(if TRX_STATE is 'BLOCKED' , otherwise
NULL ).
|
TRX_MYSQL_THREAD_ID
|
MySQL thread ID. Can be used for joining with
PROCESSLIST on ID . See Section 6.4.3, “Possible inconsistency with PROCESSLIST ”.
|
TRX_QUERY
|
The SQL query that is being executed by the transaction. |
This is the User’s Guide for InnoDB Plugin 1.0.6 for MySQL 5.1, generated on March 4, 2010 (rev 673:680M).