Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

MySQL Data Locks: Mapping 8.0 to 5.7

Дата публикации: 26-07-2021 19:40:00

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 Transaction and Locking Information” cautions their usage.
Moreover, INNODB_LOCKS only shows locks blocking other transactions, which makes it unsuitable to examine InnoDB row locking without a blocking transaction.
MySQL Data Locks: Mapping 8.0 to 5.7 appeared first on MariaDB.org


Основное содержимое страницы с новостью.

Learn MySQL Performance  7

Efficient MySQL Performance bird

Efficient MySQL Performance
20 years of MySQL performance, written for software engineers

Jul 26, 2021

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.

mysql-data-locks-mapped-to-innodb-engine-status-locks.png

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 Transaction and Locking Information” cautions their usage. Moreover, INNODB_LOCKS only shows locks blocking other transactions, which makes it unsuitable to examine InnoDB row locking without a blocking transaction.

Source: https://hackmysql.com/mysql-data-locks-mapping-80-to-57/
Copyright 2025 Daniel Nichter

comments powered by

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1InnoDB Deadlock on SELECT? Not possible! Or Is It?04.9625-11-2023
2Make SHOW as good as SELECT even with InnoDB08.5519-03-2024
3Still on MySQL 5.7 or 8.0? Those high-severity CVE fixes are covered012.2302-07-2026
4COMMIT Latency: Aurora vs. RDS MySQL 8.009.4303-01-2023
5Group Commit and Transaction Dependency Tracking012.0321-10-2024
6Sysbench vs MySQL on a small server: no new regressions, many old ones08.824-03-2026
7Mining the MySQL Performance Schema for Transactions05.6328-08-2022
8Efficient MySQL Performance In 10 Sentences09.9209-11-2024
9Do not uselessly grant CREATE and ALTER TABLE09.1120-06-2026

Классификация: . Схожих патентов: 0. Схожих новостей: 9. Тональность: 0. Информативность: 8.33. Источник: mariadb.org.