Created
July 3, 2024 18:37
-
-
Save tperalta82/6ba9200f17ba7423d564894ae8018feb to your computer and use it in GitHub Desktop.
Check for locked transactions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT OBJECT_TYPE, | |
OBJECT_SCHEMA, | |
OBJECT_NAME, | |
LOCK_TYPE, | |
LOCK_STATUS, | |
THREAD_ID, | |
PROCESSLIST_ID, | |
PROCESSLIST_INFO | |
FROM performance_schema.metadata_locks | |
INNER JOIN performance_schema.threads ON THREAD_ID = OWNER_THREAD_ID | |
WHERE PROCESSLIST_ID <> CONNECTION_ID(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment