检测锁定的表(由 LOCK TABLE 锁定)

2021-11-20 00:00:00 locking mysql

有没有办法检测 MySQL 中的锁定表?我的意思是由 LOCK TABLE table WRITE/READ 命令锁定的表.

Is there a way to detect locked tables in MySQL? I mean tables locked by the LOCK TABLE table WRITE/READ command.

(请注意,有兴趣检测使用 GET_LOCK 获取的命名锁的读者应该阅读 改为显示来自 get_lock 的所有当前锁.)

(Note that readers interested in detecting named locks acquired with GET_LOCK should read Show all current locks from get_lock instead.)

推荐答案

SHOW OPEN TABLES 显示每个表的状态和它的锁.

SHOW OPEN TABLES to show each table status and its lock.

对于命名锁,查看 从 get_lock 显示所有当前锁

相关文章