How to view deadlock?

1. It can be viewed through the jstack command, which will display the deadlocked thread.
2. Or when two threads operate the database, the database is deadlocked. This is the deadlock situation that can be queried in the database.
SQL:
1. Query whether to lock the table
show OPEN TABLES wtere In_use 》e;
2. Query the process
show processlist;
3. Check the transaction being locked
SELECT * EROM INFORMATION_SCHEMA.INNODB_LOCKS;
4. Check the transaction waiting for the lock
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS.

Supongo que te gusta

Origin blog.csdn.net/qq_44872509/article/details/130414255
Recomendado
Clasificación