The INFORMATION_SCHEMA INNODB_TRX Table • N_COLS • SPACE •This table is useful primarily for expert-level monitoring. •You must have the  PROCESS  privilege to query this table. •Use the  INFORMATION_SCHEMA COLUMNS  table or the  SHOW COLUMNS  statement to view additional information about the columns of this table, including data types and default values. • TRX_ID • TRX_WEIGHT • TRX_STATE • TRX_STARTED 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 15.15.2.1, “Using InnoDB Transaction and Locking Information” . The  INNODB_TRX  table has these columns: A unique transaction ID number, internal to  InnoDB . These IDs are not created for transactions that are read only and nonlocking. For details, see Section 8.5.3, “Optimizing InnoDB Read-Only Transactions” . 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 roll back. Transactions that have changed nontransactional tables are considered heavier than others, regardless of the number of altered and locked rows. The transaction execution state. Permitted values are  RUNNING ,  LOCK WAIT ,  ROLLING BACK , and COMMITTING . The number of columns in the temporary table. The number includes three hidden columns created by InnoDB  ( DB_ROW_ID ,  DB_TRX_ID , and  DB_ROLL_PTR ). The ID of the temporary tablespace where the temporary table resides. mysql>  CREATE TEMPORARY TABLE t1 (c1 INT PRIMARY KEY) ENGINE=INNODB; mysql>  SELECT * FROM INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO\G *************************** 1. row *************************** TABLE_ID: 97 NAME: #sql8c88_43_0 N_COLS: 4 SPACE: 76 Example Notes 26.4.30 The INFORMATION_SCHEMA INNODB_TRX Table 4881