Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 37.7Mb
PDF (A4) - 37.7Mb
PDF (RPM) - 33.8Mb
HTML Download (TGZ) - 8.4Mb
HTML Download (Zip) - 8.4Mb
HTML Download (RPM) - 7.3Mb
Man Pages (TGZ) - 130.0Kb
Man Pages (Zip) - 185.6Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb


MySQL 8.0 Reference Manual  /  ...  /  The INFORMATION_SCHEMA INNODB_LOCKS Table

Pre-General Availability Draft: 2018-02-16

25.32.14 The INFORMATION_SCHEMA INNODB_LOCKS Table

The INNODB_LOCKS table contains information about each lock that an InnoDB transaction has requested but not yet acquired, and each lock that a transaction holds that is blocking another transaction.

Note

This table is deprecated and is removed as of MySQL 8.0.1. Use the Performance Schema data_locks table instead. See Section 26.11.12.1, “The data_locks Table”.

Differences between INNODB_LOCKS and data_locks:

  • If a transaction holds a lock, INNODB_LOCKS displays the lock only if another transaction is waiting for it. data_locks displays the lock regardless of whether any transaction is waiting for it.

  • The data_locks table has no columns corresponding to LOCK_SPACE, LOCK_PAGE, or LOCK_REC.

  • The INNODB_LOCKS table requires the global PROCESS privilege. The data_locks table requires the usual Performance Schema privilege of SELECT on the table to be selected from.

The following table shows the mapping from INNODB_LOCKS columns to data_locks columns. Use this information to migrate applications from one table to the other.

Table 25.14 Mapping from INNODB_LOCKS to data_locks Columns

INNODB_LOCKS Columndata_locks Column
LOCK_IDENGINE_LOCK_ID
LOCK_TRX_IDENGINE_TRANSACTION_ID
LOCK_MODELOCK_MODE
LOCK_TYPELOCK_TYPE
LOCK_TABLE (combined schema/table names)OBJECT_SCHEMA (schema name), OBJECT_NAME (table name)
LOCK_INDEXINDEX_NAME
LOCK_SPACENone
LOCK_PAGENone
LOCK_RECNone
LOCK_DATALOCK_DATA


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