mysql view lock table status

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;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324892440&siteId=291194637