Starting with MySQL 5.7, performance_schema has been enhanced to instrument metadata locks, and can be turned on by adding the following line to your my.cnf file:
1 |
performance-schema-instrument='wait/lock/metadata/sql/%=ON' |
(At runtime, it can also be enabled by modifying the setup_instruments table in performance_schema.)…