| 1 |
select * from performance_schema.metadata_locks; |
| 2 |
select * from performance_schema.metadata_locks |
| 3 |
where object_name='foo'; |
| 4 |
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN LOCK_TYPE LOCK_DURATION LOCK_STATUS SOURCE OWNER_THREAD_ID OWNER_EVENT_ID |
| 5 |
insert into performance_schema.metadata_locks |
| 6 |
set object_name='FOO', owner_thread_id=1; |
| 7 |
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks` |
| 8 |
update performance_schema.metadata_locks |
| 9 |
set owner_thread_id=12 where object_name='foo'; |
| 10 |
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks` |
| 11 |
delete from performance_schema.metadata_locks; |
| 12 |
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks` |
| 13 |
delete from performance_schema.metadata_locks |
| 14 |
where timer_name='CYCLE'; |
| 15 |
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks` |
| 16 |
LOCK TABLES performance_schema.metadata_locks READ; |
| 17 |
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks` |
| 18 |
UNLOCK TABLES; |
| 19 |
LOCK TABLES performance_schema.metadata_locks WRITE; |
| 20 |
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks` |
| 21 |
UNLOCK TABLES; |
| 22 |
# |
| 23 |
# MDEV-25325 column_comment for performance_schema tables |
| 24 |
# |
| 25 |
select column_name, column_comment |
| 26 |
from information_schema.columns |
| 27 |
where table_schema='performance_schema' and table_name='metadata_locks'; |
| 28 |
column_name column_comment |
| 29 |
OBJECT_TYPE Object type. One of BACKUP, COMMIT, EVENT, FUNCTION, GLOBAL, LOCKING SERVICE, PROCEDURE, SCHEMA, TABLE, TABLESPACE, TRIGGER (unused) or USER LEVEL LOCK. |
| 30 |
OBJECT_SCHEMA Object schema. |
| 31 |
OBJECT_NAME Object name. |
| 32 |
OBJECT_INSTANCE_BEGIN Address in memory of the instrumented object. |
| 33 |
LOCK_TYPE Lock type. One of BACKUP_FTWRL1, BACKUP_START, BACKUP_TRANS_DML, EXCLUSIVE, INTENTION_EXCLUSIVE, SHARED, SHARED_HIGH_PRIO, SHARED_NO_READ_WRITE, SHARED_NO_WRITE, SHARED_READ, SHARED_UPGRADABLE or SHARED_WRITE. |
| 34 |
LOCK_DURATION Lock duration. One of EXPLICIT (locks released by explicit action, for example a global lock acquired with FLUSH TABLES WITH READ LOCK) , STATEMENT (locks implicitly released at statement end) or TRANSACTION (locks implicitly released at transaction end). |
| 35 |
LOCK_STATUS Lock status. One of GRANTED, KILLED, PENDING, POST_RELEASE_NOTIFY, PRE_ACQUIRE_NOTIFY, TIMEOUT or VICTIM. |
| 36 |
SOURCE Source file containing the instrumented code that produced the event, as well as the line number where the instrumentation occurred. This allows one to examine the source code involved. |
| 37 |
OWNER_THREAD_ID Thread that requested the lock. |
| 38 |
OWNER_EVENT_ID Event that requested the lock. |