The data exposed by the transaction and locking tables
(INFORMATION_SCHEMA
INNODB_TRX table, Performance
Schema data_locks and
data_lock_waits tables) represents
a glimpse into fast-changing data. This is not like user tables,
where the data changes only when application-initiated updates
occur. The underlying data is internal system-managed data, and
can change very quickly:
Data might not be consistent between the
INNODB_TRX,data_locks, anddata_lock_waitstables.The
data_locksanddata_lock_waitstables expose live data from theInnoDBstorage engine, to provide lock information about the transactions in theINNODB_TRXtable. Data retrieved from the lock tables exists when theSELECTis executed, but might be gone or changed by the time the query result is consumed by the client.Joining
data_lockswithdata_lock_waitscan show rows indata_lock_waitsthat identify a parent row indata_locksthat no longer exists or does not exist yet.Data in the transaction and locking tables might not be consistent with data in the
INFORMATION_SCHEMAPROCESSLISTtable or Performance Schemathreadstable.For example, you should be careful when comparing data in the
InnoDBtransaction and locking tables with data in thePROCESSLISTtable. Even if you issue a singleSELECT(joiningINNODB_TRXandPROCESSLIST, for example), the content of those tables is generally not consistent. It is possible forINNODB_TRXto reference rows that are not present inPROCESSLISTor for the currently executing SQL query of a transaction shown inINNODB_TRX.TRX_QUERYto differ from the one inPROCESSLIST.INFO.