As of MySQL 8.0, performance_schema.data_locks
shows InnoDB data locks. Before MySQL 8.0, you must SET
GLOBAL innodb_status_output_locks=ON
and ruminate on the
output of SHOW ENGINE INNODB STATUS
. The image below
(click to see full size) shows how the former maps to the latter
for three record locks and one table lock on table
t
.
Information Schema tables INNODB_LOCKS
and
INNODB_LOCK_WAITS
are deprecated as of MySQL 5.7 and
removed as of MySQL 8.0. They are better than nothing, but
“Persistence and Consistency of InnoDB …