These views display which sessions are blocked waiting on metadata locks, and what is blocking them.
The column descriptions here are brief. For additional
information, see the description of the Performance Schema
metadata_locks table at
Section 29.12.13.3, “The metadata_locks Table”.
The schema_table_lock_waits and
x$schema_table_lock_waits views
have these columns:
object_schemaThe schema containing the object to be locked.
object_nameThe name of the instrumented object.
waiting_thread_idThe thread ID of the thread that is waiting for the lock.
waiting_pidThe processlist ID of the thread that is waiting for the lock.
waiting_accountThe account associated with the session that is waiting for the lock.
waiting_lock_typeThe type of the waiting lock.
waiting_lock_durationHow long the waiting lock has been waiting.
waiting_queryThe statement that is waiting for the lock.
waiting_query_secsHow long the statement has been waiting, in seconds.
waiting_query_rows_affectedThe number of rows affected by the statement.
waiting_query_rows_examinedThe number of rows read from storage engines by the statement.
blocking_thread_idThe thread ID of the thread that is blocking the waiting lock.
blocking_pidThe processlist ID of the thread that is blocking the waiting lock.
blocking_accountThe account associated with the thread that is blocking the waiting lock.
blocking_lock_typeThe type of lock that is blocking the waiting lock.
blocking_lock_durationHow long the blocking lock has been held.
sql_kill_blocking_queryThe
KILLstatement to execute to kill the blocking statement.sql_kill_blocking_connectionThe
KILLstatement to execute to kill the session running the blocking statement.