mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 19:06:14 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
	
		
			2.7 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
	
		
			2.7 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| select * from performance_schema.metadata_locks;
 | |
| select * from performance_schema.metadata_locks
 | |
| where object_name='foo';
 | |
| OBJECT_TYPE	OBJECT_SCHEMA	OBJECT_NAME	OBJECT_INSTANCE_BEGIN	LOCK_TYPE	LOCK_DURATION	LOCK_STATUS	SOURCE	OWNER_THREAD_ID	OWNER_EVENT_ID
 | |
| insert into performance_schema.metadata_locks
 | |
| set object_name='FOO', owner_thread_id=1;
 | |
| ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks`
 | |
| update performance_schema.metadata_locks
 | |
| set owner_thread_id=12 where object_name='foo';
 | |
| ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks`
 | |
| delete from performance_schema.metadata_locks;
 | |
| ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks`
 | |
| delete from performance_schema.metadata_locks
 | |
| where timer_name='CYCLE';
 | |
| ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks`
 | |
| LOCK TABLES performance_schema.metadata_locks READ;
 | |
| ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks`
 | |
| UNLOCK TABLES;
 | |
| LOCK TABLES performance_schema.metadata_locks WRITE;
 | |
| ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`metadata_locks`
 | |
| UNLOCK TABLES;
 | |
| #
 | |
| # MDEV-25325 column_comment for performance_schema tables
 | |
| #
 | |
| select column_name, column_comment 
 | |
| from information_schema.columns 
 | |
| where table_schema='performance_schema' and table_name='metadata_locks';
 | |
| column_name	column_comment
 | |
| OBJECT_TYPE	Object type. One of BACKUP, COMMIT, EVENT, FUNCTION, GLOBAL, LOCKING SERVICE, PROCEDURE, SCHEMA, TABLE, TABLESPACE, TRIGGER (unused) or USER LEVEL LOCK.
 | |
| OBJECT_SCHEMA	Object schema.
 | |
| OBJECT_NAME	Object name.
 | |
| OBJECT_INSTANCE_BEGIN	Address in memory of the instrumented object.
 | |
| 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.
 | |
| 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).
 | |
| LOCK_STATUS	Lock status. One of GRANTED, KILLED, PENDING, POST_RELEASE_NOTIFY, PRE_ACQUIRE_NOTIFY, TIMEOUT or VICTIM.
 | |
| 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.
 | |
| OWNER_THREAD_ID	Thread that requested the lock.
 | |
| OWNER_EVENT_ID	Event that requested the lock.
 | 
