#### 15.15.2.3 Persistence and Consistency of InnoDB Transaction and Locking
Information

[]()

Note

 This section describes locking information as exposed by the Performance Schema [`data_locks`](performance-schema-data-locks-table.html) and [`data_lock_waits`](performance-schema-data-lock-waits-table.html) tables, which supersede the `INFORMATION_SCHEMA` `INNODB_LOCKS` and `INNODB_LOCK_WAITS` tables in MySQL 8.0. For similar discussion written in terms of the older `INFORMATION_SCHEMA` tables, see [Persistence and Consistency of InnoDB Transaction and Locking Information](https://dev.mysql.com/doc/refman/5.7/en/innodb-information-schema-internal-data.html), in [MySQL 5.7 Reference Manual](https://dev.mysql.com/doc/refman/5.7/en/).

 The data exposed by the transaction and locking tables (`INFORMATION_SCHEMA` [`INNODB_TRX`](information-schema-innodb-trx-table.html) table, Performance Schema [`data_locks`](performance-schema-data-locks-table.html) and [`data_lock_waits`](performance-schema-data-lock-waits-table.html) 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`](information-schema-innodb-trx-table.html), [`data_locks`](performance-schema-data-locks-table.html), and [`data_lock_waits`](performance-schema-data-lock-waits-table.html) tables.

   The [`data_locks`](performance-schema-data-locks-table.html) and [`data_lock_waits`](performance-schema-data-lock-waits-table.html) tables expose live data from the `InnoDB` storage engine, to provide lock inormation about the transactions in the [`INNODB_TRX`](information-schema-innodb-trx-table.html) table. Data retrieved from the lock tables exists when the [`SELECT`](select.html) is executed, but might be gone or changed by the time the query result is consumed by the client.

   Joining [`data_locks`](performance-schema-data-locks-table.html) with [`data_lock_waits`](performance-schema-data-lock-waits-table.html) can show rows in [`data_lock_waits`](performance-schema-data-lock-waits-table.html) that identify a parent row in [`data_locks`](performance-schema-data-locks-table.html) that no longer exists or does not exist yet.

* Data in the transaction and locking tables might not be consistent with data in the `INFORMATION_SCHEMA` [`PROCESSLIST`](information-schema-processlist-table.html) table or Performance Schema [`threads`](performance-schema-threads-table.html) table.

   For example, you should be careful when comparing data in the `InnoDB` transaction and locking tables with data in the [`PROCESSLIST`](information-schema-processlist-table.html) table. Even if you issue a single `SELECT` (joining [`INNODB_TRX`](information-schema-innodb-trx-table.html) and [`PROCESSLIST`](information-schema-processlist-table.html), for example), the content of those tables is generally not consistent. It is possible for [`INNODB_TRX`](information-schema-innodb-trx-table.html) to reference rows that are not present in [`PROCESSLIST`](information-schema-processlist-table.html) or for the currently executing SQL query of a transaction shown in `INNODB_TRX.TRX_QUERY` to differ from the one in `PROCESSLIST.INFO`.

