Performance Schema Lock Tables • LOCK_DURATION • LOCK_STATUS • SOURCE • OWNER_THREAD_ID • OWNER_EVENT_ID •Primary key on ( OBJECT_INSTANCE_BEGIN ) •Index on ( OBJECT_TYPE ,  OBJECT_SCHEMA ,  OBJECT_NAME ) •Index on ( OWNER_THREAD_ID ,  OWNER_EVENT_ID ) •Enable: •Disable: 5029 [mysqld] performance-schema-instrument=’wait/lock/table/sql/handler=ON’ The Performance Schema exposes table lock information through the  table_handles  table to show the table locks currently in effect for each opened table handle.  table_handles  reports what is recorded by the table lock instrumentation. This information shows which table handles the server has open, how they are locked, and by which sessions. The  table_handles  table is read only and cannot be updated. It is autosized by default; to configure the table size, set the  performance_schema_max_table_handles  system variable at server startup. Table lock instrumentation uses the  wait/lock/table/sql/handler  instrument, which is enabled by default. To control table lock instrumentation state at server startup, use lines like these in your  my.cnf  file: TRUNCATE TABLE  is not permitted for the  metadata_locks  table. 27.12.13.4 The table_handles Table The  metadata_locks  table has these indexes: The event requesting a metadata lock. The thread requesting a metadata lock. The name of the source file containing the instrumented code that produced the event and the line number in the file at which the instrumentation occurs. This enables you to check the source to determine exactly what code is involved. The lock status from the metadata lock subsystem. The value is one of  PENDING ,  GRANTED ,  VICTIM , TIMEOUT ,  KILLED ,  PRE_ACQUIRE_NOTIFY , or  POST_RELEASE_NOTIFY . The Performance Schema assigns these values as described previously. The lock duration from the metadata lock subsystem. The value is one of  STATEMENT ,  TRANSACTION , or  EXPLICIT . The  STATEMENT  and  TRANSACTION  values signify locks that are released implicitly at statement or transaction end, respectively. The  EXPLICIT  value signifies locks that survive statement or transaction end and are released by explicit action, such as global locks acquired with  FLUSH TABLES WITH READ LOCK .