mysql> show status like ‘Table%’;
+—————————-+———-+
| Variable_name | Value |
+—————————-+———-+
| Table_locks_immediate | 105 |
| Table_locks_waited | 3 |
+—————————-+———-+
Table_locks_immediate refers to the number of times that table-level locks can be obtained immediately
Table_locks_waited refers to the number of times that a table-level lock cannot be obtained immediately and needs to wait
View the table that is being locked
show OPEN TABLES where In_use > 0;