show open tables where in_use > 0
Command can query the lock table.
In_use is 1 means that this table is used by two users at the same time, one is in use and one is locked.
-- 为md_class表增加个写锁定
lock tables md_class write;
-- 查看锁表
show open tables where in_use > 0;
-- 表解锁
unlock tables;
Check the lock table:
Like the one you like ❤!