summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaidong Ji <ji@haidongji.com>2021-05-02 15:43:04 -0500
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2021-09-10 17:16:40 +0300
commitcc71dc0b61f5ed3a47f632c4b942b79511f81fbe (patch)
treeae52032f4c8de7273d5bc120eaf8ff8ea6ed706c
parent7c33ecb6651fb80f46bf9f3d8fee2e2f2b70995d (diff)
downloadmariadb-git-cc71dc0b61f5ed3a47f632c4b942b79511f81fbe.tar.gz
MDEV-25325 built-in documentation for performance_schema tables
Improve documentation of performance_schema tables by appending COLUMN comments to tables. Additionally improve test coverage and update corresponding tests. This is part of the patch covering newer columns and tables in 10.5.
-rw-r--r--mysql-test/suite/perfschema/r/dml_file_instances.result10
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result20
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result19
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result19
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result18
-rw-r--r--mysql-test/suite/perfschema/r/dml_metadata_locks.result17
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result16
-rw-r--r--mysql-test/suite/perfschema/r/schema.result140
-rw-r--r--mysql-test/suite/perfschema/r/table_schema.result142
-rw-r--r--mysql-test/suite/perfschema/t/dml_file_instances.test8
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test6
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test6
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test6
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test6
-rw-r--r--mysql-test/suite/perfschema/t/dml_metadata_locks.test6
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test7
-rw-r--r--storage/perfschema/table_md_locks.cc20
-rw-r--r--storage/perfschema/table_mems_by_account_by_event_name.cc26
-rw-r--r--storage/perfschema/table_mems_by_host_by_event_name.cc24
-rw-r--r--storage/perfschema/table_mems_by_thread_by_event_name.cc24
-rw-r--r--storage/perfschema/table_mems_by_user_by_event_name.cc24
-rw-r--r--storage/perfschema/table_mems_global_by_event_name.cc22
-rw-r--r--storage/perfschema/table_replication_applier_status_by_worker.cc16
23 files changed, 383 insertions, 219 deletions
diff --git a/mysql-test/suite/perfschema/r/dml_file_instances.result b/mysql-test/suite/perfschema/r/dml_file_instances.result
index a87d7d2b55e..3758fe48ab6 100644
--- a/mysql-test/suite/perfschema/r/dml_file_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_file_instances.result
@@ -87,3 +87,13 @@ DROP TABLE t_db_26152751;
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
FILE_NAME
DROP DATABASE db_26152751;
+#
+# MDEV-25325 column_comment for performance_shcema tables
+#
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='file_instances';
+column_name column_comment
+FILE_NAME File name.
+EVENT_NAME Instrument name associated with the file.
+OPEN_COUNT Open handles on the file. A value of greater than zero means that the file is currently open.
diff --git a/mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result
index 6333ae9c3c3..bc26376e24e 100644
--- a/mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result
@@ -24,3 +24,23 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.memory_summary_by_account_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_account_by_event_name'
UNLOCK TABLES;
+#
+# MDEV-25325 column_comment for performance_shcema tables
+#
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='memory_summary_by_account_by_event_name';
+column_name column_comment
+USER User portion of the account.
+HOST Host portion of the account.
+EVENT_NAME Event name.
+COUNT_ALLOC Total number of allocations to memory.
+COUNT_FREE Total number of attempts to free the allocated memory.
+SUM_NUMBER_OF_BYTES_ALLOC Total number of bytes allocated.
+SUM_NUMBER_OF_BYTES_FREE Total number of bytes freed
+LOW_COUNT_USED Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).
+CURRENT_COUNT_USED Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).
+HIGH_COUNT_USED Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).
+LOW_NUMBER_OF_BYTES_USED Lowest number of bytes used.
+CURRENT_NUMBER_OF_BYTES_USED Current number of bytes used (total allocated minus total freed).
+HIGH_NUMBER_OF_BYTES_USED Highest number of bytes used.
diff --git a/mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result
index 6e2c855c581..a7afa5651a8 100644
--- a/mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result
@@ -24,3 +24,22 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.memory_summary_by_host_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_host_by_event_name'
UNLOCK TABLES;
+#
+# MDEV-25325 column_comment for performance_shcema tables
+#
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='memory_summary_by_host_by_event_name';
+column_name column_comment
+HOST Host portion of the account.
+EVENT_NAME Event name.
+COUNT_ALLOC Total number of allocations to memory.
+COUNT_FREE Total number of attempts to free the allocated memory.
+SUM_NUMBER_OF_BYTES_ALLOC Total number of bytes allocated.
+SUM_NUMBER_OF_BYTES_FREE Total number of bytes freed
+LOW_COUNT_USED Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).
+CURRENT_COUNT_USED Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).
+HIGH_COUNT_USED Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).
+LOW_NUMBER_OF_BYTES_USED Lowest number of bytes used.
+CURRENT_NUMBER_OF_BYTES_USED Current number of bytes used (total allocated minus total freed).
+HIGH_NUMBER_OF_BYTES_USED Highest number of bytes used.
diff --git a/mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result
index 3beab7f9ba4..cfc6b561e20 100644
--- a/mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result
@@ -24,3 +24,22 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.memory_summary_by_user_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_user_by_event_name'
UNLOCK TABLES;
+#
+# MDEV-25325 column_comment for performance_shcema tables
+#
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='memory_summary_by_user_by_event_name';
+column_name column_comment
+USER User portion of the account.
+EVENT_NAME Event name.
+COUNT_ALLOC Total number of allocations to memory.
+COUNT_FREE Total number of attempts to free the allocated memory.
+SUM_NUMBER_OF_BYTES_ALLOC Total number of bytes allocated.
+SUM_NUMBER_OF_BYTES_FREE Total number of bytes freed
+LOW_COUNT_USED Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).
+CURRENT_COUNT_USED Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).
+HIGH_COUNT_USED Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).
+LOW_NUMBER_OF_BYTES_USED Lowest number of bytes used.
+CURRENT_NUMBER_OF_BYTES_USED Current number of bytes used (total allocated minus total freed).
+HIGH_NUMBER_OF_BYTES_USED Highest number of bytes used.
diff --git a/mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result
index 06ac00d1d8f..a0a6556629d 100644
--- a/mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result
@@ -24,3 +24,21 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.memory_summary_global_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_global_by_event_name'
UNLOCK TABLES;
+#
+# MDEV-25325 column_comment for performance_shcema tables
+#
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='memory_summary_global_by_event_name';
+column_name column_comment
+EVENT_NAME Event name.
+COUNT_ALLOC Total number of allocations to memory.
+COUNT_FREE Total number of attempts to free the allocated memory.
+SUM_NUMBER_OF_BYTES_ALLOC Total number of bytes allocated.
+SUM_NUMBER_OF_BYTES_FREE Total number of bytes freed
+LOW_COUNT_USED Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).
+CURRENT_COUNT_USED Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).
+HIGH_COUNT_USED Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).
+LOW_NUMBER_OF_BYTES_USED Lowest number of bytes used.
+CURRENT_NUMBER_OF_BYTES_USED Current number of bytes used (total allocated minus total freed).
+HIGH_NUMBER_OF_BYTES_USED Highest number of bytes used.
diff --git a/mysql-test/suite/perfschema/r/dml_metadata_locks.result b/mysql-test/suite/perfschema/r/dml_metadata_locks.result
index 03f62bc95c5..2c27439cc4b 100644
--- a/mysql-test/suite/perfschema/r/dml_metadata_locks.result
+++ b/mysql-test/suite/perfschema/r/dml_metadata_locks.result
@@ -19,3 +19,20 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.metadata_locks WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'metadata_locks'
UNLOCK TABLES;
+#
+# MDEV-25325 column_comment for performance_shcema 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.
diff --git a/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result b/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result
index 8033da46a1d..9b1f6794128 100644
--- a/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result
+++ b/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result
@@ -23,3 +23,19 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.replication_applier_status_by_worker WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_status_by_worker'
UNLOCK TABLES;
+#
+# MDEV-25325 column_comment for performance_shcema tables
+#
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='replication_applier_status_by_worker';
+column_name column_comment
+CHANNEL_NAME Name of replication channel through which the transaction is received.
+THREAD_ID Thread_Id as displayed in the performance_schema.threads table for thread with name 'thread/sql/rpl_parallel_thread'. THREAD_ID will be NULL when worker threads are stopped due to error/force stop.
+SERVICE_STATE Whether or not the thread is running.
+LAST_SEEN_TRANSACTION Last GTID executed by worker
+LAST_ERROR_NUMBER Last Error that occurred on a particular worker.
+LAST_ERROR_MESSAGE Last error specific message.
+LAST_ERROR_TIMESTAMP Time stamp of last error.
+WORKER_IDLE_TIME Total idle time in seconds that the worker thread has spent waiting for work from SQL thread.
+LAST_TRANS_RETRY_COUNT Total number of retries attempted by last transaction.
diff --git a/mysql-test/suite/perfschema/r/schema.result b/mysql-test/suite/perfschema/r/schema.result
index 2eb58a1d43a..c6f92634c4a 100644
--- a/mysql-test/suite/perfschema/r/schema.result
+++ b/mysql-test/suite/perfschema/r/schema.result
@@ -849,96 +849,96 @@ events_waits_summary_global_by_event_name CREATE TABLE `events_waits_summary_glo
show create table memory_summary_by_host_by_event_name;
Table Create Table
memory_summary_by_host_by_event_name CREATE TABLE `memory_summary_by_host_by_event_name` (
- `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
- `EVENT_NAME` varchar(128) NOT NULL,
- `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
- `COUNT_FREE` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
- `LOW_COUNT_USED` bigint(20) NOT NULL,
- `CURRENT_COUNT_USED` bigint(20) NOT NULL,
- `HIGH_COUNT_USED` bigint(20) NOT NULL,
- `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'Host portion of the account.',
+ `EVENT_NAME` varchar(128) NOT NULL COMMENT 'Event name.',
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of allocations to memory.',
+ `COUNT_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of attempts to free the allocated memory.',
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes allocated.',
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes freed',
+ `LOW_COUNT_USED` bigint(20) NOT NULL COMMENT 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL COMMENT 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',
+ `HIGH_COUNT_USED` bigint(20) NOT NULL COMMENT 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Lowest number of bytes used.',
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Current number of bytes used (total allocated minus total freed).',
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Highest number of bytes used.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table memory_summary_by_thread_by_event_name;
Table Create Table
memory_summary_by_thread_by_event_name CREATE TABLE `memory_summary_by_thread_by_event_name` (
- `THREAD_ID` bigint(20) unsigned NOT NULL,
- `EVENT_NAME` varchar(128) NOT NULL,
- `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
- `COUNT_FREE` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
- `LOW_COUNT_USED` bigint(20) NOT NULL,
- `CURRENT_COUNT_USED` bigint(20) NOT NULL,
- `HIGH_COUNT_USED` bigint(20) NOT NULL,
- `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+ `THREAD_ID` bigint(20) unsigned NOT NULL COMMENT 'Thread id.',
+ `EVENT_NAME` varchar(128) NOT NULL COMMENT 'Event name.',
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of allocations to memory.',
+ `COUNT_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of attempts to free the allocated memory.',
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes allocated.',
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes freed',
+ `LOW_COUNT_USED` bigint(20) NOT NULL COMMENT 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL COMMENT 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',
+ `HIGH_COUNT_USED` bigint(20) NOT NULL COMMENT 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Lowest number of bytes used.',
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Current number of bytes used (total allocated minus total freed).',
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Highest number of bytes used.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table memory_summary_by_user_by_event_name;
Table Create Table
memory_summary_by_user_by_event_name CREATE TABLE `memory_summary_by_user_by_event_name` (
- `USER` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
- `EVENT_NAME` varchar(128) NOT NULL,
- `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
- `COUNT_FREE` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
- `LOW_COUNT_USED` bigint(20) NOT NULL,
- `CURRENT_COUNT_USED` bigint(20) NOT NULL,
- `HIGH_COUNT_USED` bigint(20) NOT NULL,
- `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+ `USER` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'User portion of the account.',
+ `EVENT_NAME` varchar(128) NOT NULL COMMENT 'Event name.',
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of allocations to memory.',
+ `COUNT_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of attempts to free the allocated memory.',
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes allocated.',
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes freed',
+ `LOW_COUNT_USED` bigint(20) NOT NULL COMMENT 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL COMMENT 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',
+ `HIGH_COUNT_USED` bigint(20) NOT NULL COMMENT 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Lowest number of bytes used.',
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Current number of bytes used (total allocated minus total freed).',
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Highest number of bytes used.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table memory_summary_by_account_by_event_name;
Table Create Table
memory_summary_by_account_by_event_name CREATE TABLE `memory_summary_by_account_by_event_name` (
- `USER` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
- `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
- `EVENT_NAME` varchar(128) NOT NULL,
- `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
- `COUNT_FREE` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
- `LOW_COUNT_USED` bigint(20) NOT NULL,
- `CURRENT_COUNT_USED` bigint(20) NOT NULL,
- `HIGH_COUNT_USED` bigint(20) NOT NULL,
- `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+ `USER` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'User portion of the account.',
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'Host portion of the account.',
+ `EVENT_NAME` varchar(128) NOT NULL COMMENT 'Event name.',
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of allocations to memory.',
+ `COUNT_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of attempts to free the allocated memory.',
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes allocated.',
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes freed',
+ `LOW_COUNT_USED` bigint(20) NOT NULL COMMENT 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL COMMENT 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',
+ `HIGH_COUNT_USED` bigint(20) NOT NULL COMMENT 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Lowest number of bytes used.',
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Current number of bytes used (total allocated minus total freed).',
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Highest number of bytes used.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table memory_summary_global_by_event_name;
Table Create Table
memory_summary_global_by_event_name CREATE TABLE `memory_summary_global_by_event_name` (
- `EVENT_NAME` varchar(128) NOT NULL,
- `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
- `COUNT_FREE` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
- `LOW_COUNT_USED` bigint(20) NOT NULL,
- `CURRENT_COUNT_USED` bigint(20) NOT NULL,
- `HIGH_COUNT_USED` bigint(20) NOT NULL,
- `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
- `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+ `EVENT_NAME` varchar(128) NOT NULL COMMENT 'Event name.',
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of allocations to memory.',
+ `COUNT_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of attempts to free the allocated memory.',
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes allocated.',
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL COMMENT 'Total number of bytes freed',
+ `LOW_COUNT_USED` bigint(20) NOT NULL COMMENT 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL COMMENT 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',
+ `HIGH_COUNT_USED` bigint(20) NOT NULL COMMENT 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Lowest number of bytes used.',
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Current number of bytes used (total allocated minus total freed).',
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL COMMENT 'Highest number of bytes used.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table metadata_locks;
Table Create Table
metadata_locks CREATE TABLE `metadata_locks` (
- `OBJECT_TYPE` varchar(64) NOT NULL,
- `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
- `OBJECT_NAME` varchar(64) DEFAULT NULL,
- `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
- `LOCK_TYPE` varchar(32) NOT NULL,
- `LOCK_DURATION` varchar(32) NOT NULL,
- `LOCK_STATUS` varchar(32) NOT NULL,
- `SOURCE` varchar(64) DEFAULT NULL,
- `OWNER_THREAD_ID` bigint(20) unsigned DEFAULT NULL,
- `OWNER_EVENT_ID` bigint(20) unsigned DEFAULT NULL
+ `OBJECT_TYPE` varchar(64) NOT NULL COMMENT 'Object type. One of BACKUP, COMMIT, EVENT, FUNCTION, GLOBAL, LOCKING SERVICE, PROCEDURE, SCHEMA, TABLE, TABLESPACE, TRIGGER (unused) or USER LEVEL LOCK.',
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL COMMENT 'Object schema.',
+ `OBJECT_NAME` varchar(64) DEFAULT NULL COMMENT 'Object name.',
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL COMMENT 'Address in memory of the instrumented object.',
+ `LOCK_TYPE` varchar(32) NOT NULL COMMENT '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` varchar(32) NOT NULL COMMENT '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` varchar(32) NOT NULL COMMENT 'Lock status. One of GRANTED, KILLED, PENDING, POST_RELEASE_NOTIFY, PRE_ACQUIRE_NOTIFY, TIMEOUT or VICTIM.',
+ `SOURCE` varchar(64) DEFAULT NULL COMMENT '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` bigint(20) unsigned DEFAULT NULL COMMENT 'Thread that requested the lock.',
+ `OWNER_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'Event that requested the lock.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table file_instances;
Table Create Table
diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result
index 73232c95100..7164755c91c 100644
--- a/mysql-test/suite/perfschema/r/table_schema.result
+++ b/mysql-test/suite/perfschema/r/table_schema.result
@@ -733,76 +733,76 @@ def performance_schema host_cache FIRST_SEEN 26 '0000-00-00 00:00:00' NO timesta
def performance_schema host_cache LAST_SEEN 27 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references Timestamp of the most recent connection attempt by the IP. NEVER NULL
def performance_schema host_cache FIRST_ERROR_SEEN 28 '0000-00-00 00:00:00' YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references Timestamp of the first error seen from the IP. NEVER NULL
def performance_schema host_cache LAST_ERROR_SEEN 29 '0000-00-00 00:00:00' YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references Timestamp of the most recent error seen from the IP. NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name COUNT_ALLOC 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name COUNT_FREE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name SUM_NUMBER_OF_BYTES_FREE 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name LOW_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name CURRENT_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name HIGH_COUNT_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name LOW_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name CURRENT_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_account_by_event_name HIGH_NUMBER_OF_BYTES_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_host_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_thread_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_by_user_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name COUNT_ALLOC 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name COUNT_FREE 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name SUM_NUMBER_OF_BYTES_FREE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name LOW_COUNT_USED 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name CURRENT_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name HIGH_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name LOW_NUMBER_OF_BYTES_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name CURRENT_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema memory_summary_global_by_event_name HIGH_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
-def performance_schema metadata_locks OBJECT_TYPE 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
-def performance_schema metadata_locks OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
-def performance_schema metadata_locks OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
-def performance_schema metadata_locks OBJECT_INSTANCE_BEGIN 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema metadata_locks LOCK_TYPE 5 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references NEVER NULL
-def performance_schema metadata_locks LOCK_DURATION 6 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references NEVER NULL
-def performance_schema metadata_locks LOCK_STATUS 7 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references NEVER NULL
-def performance_schema metadata_locks SOURCE 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
-def performance_schema metadata_locks OWNER_THREAD_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
-def performance_schema metadata_locks OWNER_EVENT_ID 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references User portion of the account. NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references Host portion of the account. NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Event name. NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name COUNT_ALLOC 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of allocations to memory. NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name COUNT_FREE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of attempts to free the allocated memory. NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes allocated. NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name SUM_NUMBER_OF_BYTES_FREE 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes freed NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name LOW_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name CURRENT_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE). NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name HIGH_COUNT_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of allocated blocks (highest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name LOW_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of bytes used. NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name CURRENT_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Current number of bytes used (total allocated minus total freed). NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name HIGH_NUMBER_OF_BYTES_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of bytes used. NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references Host portion of the account. NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Event name. NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of allocations to memory. NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of attempts to free the allocated memory. NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes allocated. NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes freed NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE). NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of allocated blocks (highest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of bytes used. NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Current number of bytes used (total allocated minus total freed). NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of bytes used. NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread id. NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Event name. NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of allocations to memory. NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of attempts to free the allocated memory. NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes allocated. NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes freed NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE). NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of allocated blocks (highest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of bytes used. NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Current number of bytes used (total allocated minus total freed). NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of bytes used. NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references User portion of the account. NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Event name. NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of allocations to memory. NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of attempts to free the allocated memory. NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes allocated. NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes freed NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE). NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of allocated blocks (highest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of bytes used. NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Current number of bytes used (total allocated minus total freed). NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of bytes used. NEVER NULL
+def performance_schema memory_summary_global_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Event name. NEVER NULL
+def performance_schema memory_summary_global_by_event_name COUNT_ALLOC 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of allocations to memory. NEVER NULL
+def performance_schema memory_summary_global_by_event_name COUNT_FREE 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of attempts to free the allocated memory. NEVER NULL
+def performance_schema memory_summary_global_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes allocated. NEVER NULL
+def performance_schema memory_summary_global_by_event_name SUM_NUMBER_OF_BYTES_FREE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Total number of bytes freed NEVER NULL
+def performance_schema memory_summary_global_by_event_name LOW_COUNT_USED 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_global_by_event_name CURRENT_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE). NEVER NULL
+def performance_schema memory_summary_global_by_event_name HIGH_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of allocated blocks (highest value of CURRENT_COUNT_USED). NEVER NULL
+def performance_schema memory_summary_global_by_event_name LOW_NUMBER_OF_BYTES_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Lowest number of bytes used. NEVER NULL
+def performance_schema memory_summary_global_by_event_name CURRENT_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Current number of bytes used (total allocated minus total freed). NEVER NULL
+def performance_schema memory_summary_global_by_event_name HIGH_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Highest number of bytes used. NEVER NULL
+def performance_schema metadata_locks OBJECT_TYPE 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Object type. One of BACKUP, COMMIT, EVENT, FUNCTION, GLOBAL, LOCKING SERVICE, PROCEDURE, SCHEMA, TABLE, TABLESPACE, TRIGGER (unused) or USER LEVEL LOCK. NEVER NULL
+def performance_schema metadata_locks OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Object schema. NEVER NULL
+def performance_schema metadata_locks OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Object name. NEVER NULL
+def performance_schema metadata_locks OBJECT_INSTANCE_BEGIN 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Address in memory of the instrumented object. NEVER NULL
+def performance_schema metadata_locks LOCK_TYPE 5 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references 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. NEVER NULL
+def performance_schema metadata_locks LOCK_DURATION 6 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references 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). NEVER NULL
+def performance_schema metadata_locks LOCK_STATUS 7 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references Lock status. One of GRANTED, KILLED, PENDING, POST_RELEASE_NOTIFY, PRE_ACQUIRE_NOTIFY, TIMEOUT or VICTIM. NEVER NULL
+def performance_schema metadata_locks SOURCE 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references 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. NEVER NULL
+def performance_schema metadata_locks OWNER_THREAD_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread that requested the lock. NEVER NULL
+def performance_schema metadata_locks OWNER_EVENT_ID 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Event that requested the lock. NEVER NULL
def performance_schema mutex_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Instrument name associated with the mutex. NEVER NULL
def performance_schema mutex_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Memory address of the instrumented mutex. NEVER NULL
def performance_schema mutex_instances LOCKED_BY_THREAD_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references The THREAD_ID of the locking thread if a thread has a mutex locked, otherwise NULL. NEVER NULL
@@ -1193,4 +1193,4 @@ select count(*) from information_schema.columns
where table_schema="performance_schema"
and (column_comment is null or column_comment = '');
count(*)
-366
+296
diff --git a/mysql-test/suite/perfschema/t/dml_file_instances.test b/mysql-test/suite/perfschema/t/dml_file_instances.test
index e5d1e9903ec..2d10c13826c 100644
--- a/mysql-test/suite/perfschema/t/dml_file_instances.test
+++ b/mysql-test/suite/perfschema/t/dml_file_instances.test
@@ -103,3 +103,11 @@ DROP TABLE t_db_26152751;
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
DROP DATABASE db_26152751;
+
+
+--echo #
+--echo # MDEV-25325 column_comment for performance_shcema tables
+--echo #
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='file_instances';
diff --git a/mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test
index a620f586553..88492143af4 100644
--- a/mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test
@@ -40,3 +40,9 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.memory_summary_by_account_by_event_name WRITE;
UNLOCK TABLES;
+--echo #
+--echo # MDEV-25325 column_comment for performance_shcema tables
+--echo #
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='memory_summary_by_account_by_event_name';
diff --git a/mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test
index 71c21457691..f3acb56f41b 100644
--- a/mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test
@@ -40,3 +40,9 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.memory_summary_by_host_by_event_name WRITE;
UNLOCK TABLES;
+--echo #
+--echo # MDEV-25325 column_comment for performance_shcema tables
+--echo #
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='memory_summary_by_host_by_event_name';
diff --git a/mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test
index 3cf63097356..614d0ecd5de 100644
--- a/mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test
@@ -40,3 +40,9 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.memory_summary_by_user_by_event_name WRITE;
UNLOCK TABLES;
+--echo #
+--echo # MDEV-25325 column_comment for performance_shcema tables
+--echo #
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='memory_summary_by_user_by_event_name';
diff --git a/mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test
index 4e716dc668f..48a75ba4af1 100644
--- a/mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test
@@ -40,3 +40,9 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.memory_summary_global_by_event_name WRITE;
UNLOCK TABLES;
+--echo #
+--echo # MDEV-25325 column_comment for performance_shcema tables
+--echo #
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='memory_summary_global_by_event_name';
diff --git a/mysql-test/suite/perfschema/t/dml_metadata_locks.test b/mysql-test/suite/perfschema/t/dml_metadata_locks.test
index d4ace2c708b..fc914dc1104 100644
--- a/mysql-test/suite/perfschema/t/dml_metadata_locks.test
+++ b/mysql-test/suite/perfschema/t/dml_metadata_locks.test
@@ -33,3 +33,9 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.metadata_locks WRITE;
UNLOCK TABLES;
+--echo #
+--echo # MDEV-25325 column_comment for performance_shcema tables
+--echo #
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='metadata_locks';
diff --git a/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test b/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test
index 53f50935258..c9b8d789a7c 100644
--- a/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test
+++ b/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test
@@ -41,3 +41,10 @@ UNLOCK TABLES;
-- error ER_TABLEACCESS_DENIED_ERROR
LOCK TABLES performance_schema.replication_applier_status_by_worker WRITE;
UNLOCK TABLES;
+
+--echo #
+--echo # MDEV-25325 column_comment for performance_shcema tables
+--echo #
+select column_name, column_comment
+from information_schema.columns
+where table_schema='performance_schema' and table_name='replication_applier_status_by_worker';
diff --git a/storage/perfschema/table_md_locks.cc b/storage/perfschema/table_md_locks.cc
index 9f78750e89b..a6bfdd25b68 100644
--- a/storage/perfschema/table_md_locks.cc
+++ b/storage/perfschema/table_md_locks.cc
@@ -49,16 +49,16 @@ table_metadata_locks::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE metadata_locks("
- "OBJECT_TYPE VARCHAR(64) not null,"
- "OBJECT_SCHEMA VARCHAR(64),"
- "OBJECT_NAME VARCHAR(64),"
- "OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
- "LOCK_TYPE VARCHAR(32) not null,"
- "LOCK_DURATION VARCHAR(32) not null,"
- "LOCK_STATUS VARCHAR(32) not null,"
- "SOURCE VARCHAR(64),"
- "OWNER_THREAD_ID BIGINT unsigned,"
- "OWNER_EVENT_ID BIGINT unsigned)")},
+ "OBJECT_TYPE VARCHAR(64) not null comment 'Object type. One of BACKUP, COMMIT, EVENT, FUNCTION, GLOBAL, LOCKING SERVICE, PROCEDURE, SCHEMA, TABLE, TABLESPACE, TRIGGER (unused) or USER LEVEL LOCK.',"
+ "OBJECT_SCHEMA VARCHAR(64) comment 'Object schema.',"
+ "OBJECT_NAME VARCHAR(64) comment 'Object name.',"
+ "OBJECT_INSTANCE_BEGIN BIGINT unsigned not null comment 'Address in memory of the instrumented object.',"
+ "LOCK_TYPE VARCHAR(32) not null comment '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 VARCHAR(32) not null comment '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 VARCHAR(32) not null comment 'Lock status. One of GRANTED, KILLED, PENDING, POST_RELEASE_NOTIFY, PRE_ACQUIRE_NOTIFY, TIMEOUT or VICTIM.',"
+ "SOURCE VARCHAR(64) comment '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 BIGINT unsigned comment 'Thread that requested the lock.',"
+ "OWNER_EVENT_ID BIGINT unsigned comment 'Event that requested the lock.')")},
false /* perpetual */
};
diff --git a/storage/perfschema/table_mems_by_account_by_event_name.cc b/storage/perfschema/table_mems_by_account_by_event_name.cc
index 5c83c225d11..7a0254d91a2 100644
--- a/storage/perfschema/table_mems_by_account_by_event_name.cc
+++ b/storage/perfschema/table_mems_by_account_by_event_name.cc
@@ -51,19 +51,19 @@ table_mems_by_account_by_event_name::m_share=
sizeof(pos_mems_by_account_by_event_name),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE memory_summary_by_account_by_event_name("
- "USER CHAR(32) collate utf8_bin default null,"
- "HOST CHAR(60) collate utf8_bin default null,"
- "EVENT_NAME VARCHAR(128) not null,"
- "COUNT_ALLOC BIGINT unsigned not null,"
- "COUNT_FREE BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null,"
- "LOW_COUNT_USED BIGINT not null,"
- "CURRENT_COUNT_USED BIGINT not null,"
- "HIGH_COUNT_USED BIGINT not null,"
- "LOW_NUMBER_OF_BYTES_USED BIGINT not null,"
- "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null,"
- "HIGH_NUMBER_OF_BYTES_USED BIGINT not null)")},
+ "USER CHAR(32) collate utf8_bin default null comment 'User portion of the account.',"
+ "HOST CHAR(60) collate utf8_bin default null comment 'Host portion of the account.',"
+ "EVENT_NAME VARCHAR(128) not null comment 'Event name.',"
+ "COUNT_ALLOC BIGINT unsigned not null comment 'Total number of allocations to memory.',"
+ "COUNT_FREE BIGINT unsigned not null comment 'Total number of attempts to free the allocated memory.',"
+ "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null comment 'Total number of bytes allocated.',"
+ "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null comment 'Total number of bytes freed',"
+ "LOW_COUNT_USED BIGINT not null comment 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',"
+ "CURRENT_COUNT_USED BIGINT not null comment 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',"
+ "HIGH_COUNT_USED BIGINT not null comment 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',"
+ "LOW_NUMBER_OF_BYTES_USED BIGINT not null comment 'Lowest number of bytes used.',"
+ "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null comment 'Current number of bytes used (total allocated minus total freed).',"
+ "HIGH_NUMBER_OF_BYTES_USED BIGINT not null comment 'Highest number of bytes used.')")},
false /* perpetual */
};
diff --git a/storage/perfschema/table_mems_by_host_by_event_name.cc b/storage/perfschema/table_mems_by_host_by_event_name.cc
index 0921dfa49c8..4b91d0420d5 100644
--- a/storage/perfschema/table_mems_by_host_by_event_name.cc
+++ b/storage/perfschema/table_mems_by_host_by_event_name.cc
@@ -51,18 +51,18 @@ table_mems_by_host_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE memory_summary_by_host_by_event_name("
- "HOST CHAR(60) collate utf8_bin default null,"
- "EVENT_NAME VARCHAR(128) not null,"
- "COUNT_ALLOC BIGINT unsigned not null,"
- "COUNT_FREE BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null,"
- "LOW_COUNT_USED BIGINT not null,"
- "CURRENT_COUNT_USED BIGINT not null,"
- "HIGH_COUNT_USED BIGINT not null,"
- "LOW_NUMBER_OF_BYTES_USED BIGINT not null,"
- "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null,"
- "HIGH_NUMBER_OF_BYTES_USED BIGINT not null)")},
+ "HOST CHAR(60) collate utf8_bin default null comment 'Host portion of the account.',"
+ "EVENT_NAME VARCHAR(128) not null comment 'Event name.',"
+ "COUNT_ALLOC BIGINT unsigned not null comment 'Total number of allocations to memory.',"
+ "COUNT_FREE BIGINT unsigned not null comment 'Total number of attempts to free the allocated memory.',"
+ "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null comment 'Total number of bytes allocated.',"
+ "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null comment 'Total number of bytes freed',"
+ "LOW_COUNT_USED BIGINT not null comment 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',"
+ "CURRENT_COUNT_USED BIGINT not null comment 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',"
+ "HIGH_COUNT_USED BIGINT not null comment 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',"
+ "LOW_NUMBER_OF_BYTES_USED BIGINT not null comment 'Lowest number of bytes used.',"
+ "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null comment 'Current number of bytes used (total allocated minus total freed).',"
+ "HIGH_NUMBER_OF_BYTES_USED BIGINT not null comment 'Highest number of bytes used.')")},
false /* perpetual */
};
diff --git a/storage/perfschema/table_mems_by_thread_by_event_name.cc b/storage/perfschema/table_mems_by_thread_by_event_name.cc
index 9e36cb76dd7..3c25e948cbf 100644
--- a/storage/perfschema/table_mems_by_thread_by_event_name.cc
+++ b/storage/perfschema/table_mems_by_thread_by_event_name.cc
@@ -51,18 +51,18 @@ table_mems_by_thread_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE memory_summary_by_thread_by_event_name("
- "THREAD_ID BIGINT unsigned not null,"
- "EVENT_NAME VARCHAR(128) not null,"
- "COUNT_ALLOC BIGINT unsigned not null,"
- "COUNT_FREE BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null,"
- "LOW_COUNT_USED BIGINT not null,"
- "CURRENT_COUNT_USED BIGINT not null,"
- "HIGH_COUNT_USED BIGINT not null,"
- "LOW_NUMBER_OF_BYTES_USED BIGINT not null,"
- "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null,"
- "HIGH_NUMBER_OF_BYTES_USED BIGINT not null)")},
+ "THREAD_ID BIGINT unsigned not null comment 'Thread id.',"
+ "EVENT_NAME VARCHAR(128) not null comment 'Event name.',"
+ "COUNT_ALLOC BIGINT unsigned not null comment 'Total number of allocations to memory.',"
+ "COUNT_FREE BIGINT unsigned not null comment 'Total number of attempts to free the allocated memory.',"
+ "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null comment 'Total number of bytes allocated.',"
+ "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null comment 'Total number of bytes freed',"
+ "LOW_COUNT_USED BIGINT not null comment 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',"
+ "CURRENT_COUNT_USED BIGINT not null comment 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',"
+ "HIGH_COUNT_USED BIGINT not null comment 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',"
+ "LOW_NUMBER_OF_BYTES_USED BIGINT not null comment 'Lowest number of bytes used.',"
+ "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null comment 'Current number of bytes used (total allocated minus total freed).',"
+ "HIGH_NUMBER_OF_BYTES_USED BIGINT not null comment 'Highest number of bytes used.')")},
false /* perpetual */
};
diff --git a/storage/perfschema/table_mems_by_user_by_event_name.cc b/storage/perfschema/table_mems_by_user_by_event_name.cc
index 5d5ee89d6bd..dbb4b19c430 100644
--- a/storage/perfschema/table_mems_by_user_by_event_name.cc
+++ b/storage/perfschema/table_mems_by_user_by_event_name.cc
@@ -51,18 +51,18 @@ table_mems_by_user_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE memory_summary_by_user_by_event_name("
- "USER CHAR(32) collate utf8_bin default null,"
- "EVENT_NAME VARCHAR(128) not null,"
- "COUNT_ALLOC BIGINT unsigned not null,"
- "COUNT_FREE BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null,"
- "LOW_COUNT_USED BIGINT not null,"
- "CURRENT_COUNT_USED BIGINT not null,"
- "HIGH_COUNT_USED BIGINT not null,"
- "LOW_NUMBER_OF_BYTES_USED BIGINT not null,"
- "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null,"
- "HIGH_NUMBER_OF_BYTES_USED BIGINT not null)")},
+ "USER CHAR(32) collate utf8_bin default null comment 'User portion of the account.',"
+ "EVENT_NAME VARCHAR(128) not null comment 'Event name.',"
+ "COUNT_ALLOC BIGINT unsigned not null comment 'Total number of allocations to memory.',"
+ "COUNT_FREE BIGINT unsigned not null comment 'Total number of attempts to free the allocated memory.',"
+ "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null comment 'Total number of bytes allocated.',"
+ "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null comment 'Total number of bytes freed',"
+ "LOW_COUNT_USED BIGINT not null comment 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',"
+ "CURRENT_COUNT_USED BIGINT not null comment 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',"
+ "HIGH_COUNT_USED BIGINT not null comment 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',"
+ "LOW_NUMBER_OF_BYTES_USED BIGINT not null comment 'Lowest number of bytes used.',"
+ "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null comment 'Current number of bytes used (total allocated minus total freed).',"
+ "HIGH_NUMBER_OF_BYTES_USED BIGINT not null comment 'Highest number of bytes used.')")},
false /* perpetual */
};
diff --git a/storage/perfschema/table_mems_global_by_event_name.cc b/storage/perfschema/table_mems_global_by_event_name.cc
index 93496e38cf4..4a6f7e86fed 100644
--- a/storage/perfschema/table_mems_global_by_event_name.cc
+++ b/storage/perfschema/table_mems_global_by_event_name.cc
@@ -51,17 +51,17 @@ table_mems_global_by_event_name::m_share=
sizeof(pos_t),
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE memory_summary_global_by_event_name("
- "EVENT_NAME VARCHAR(128) not null,"
- "COUNT_ALLOC BIGINT unsigned not null,"
- "COUNT_FREE BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null,"
- "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null,"
- "LOW_COUNT_USED BIGINT not null,"
- "CURRENT_COUNT_USED BIGINT not null,"
- "HIGH_COUNT_USED BIGINT not null,"
- "LOW_NUMBER_OF_BYTES_USED BIGINT not null,"
- "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null,"
- "HIGH_NUMBER_OF_BYTES_USED BIGINT not null)")},
+ "EVENT_NAME VARCHAR(128) not null comment 'Event name.',"
+ "COUNT_ALLOC BIGINT unsigned not null comment 'Total number of allocations to memory.',"
+ "COUNT_FREE BIGINT unsigned not null comment 'Total number of attempts to free the allocated memory.',"
+ "SUM_NUMBER_OF_BYTES_ALLOC BIGINT unsigned not null comment 'Total number of bytes allocated.',"
+ "SUM_NUMBER_OF_BYTES_FREE BIGINT unsigned not null comment 'Total number of bytes freed',"
+ "LOW_COUNT_USED BIGINT not null comment 'Lowest number of allocated blocks (lowest value of CURRENT_COUNT_USED).',"
+ "CURRENT_COUNT_USED BIGINT not null comment 'Currently allocated blocks that have not been freed (COUNT_ALLOC minus COUNT_FREE).',"
+ "HIGH_COUNT_USED BIGINT not null comment 'Highest number of allocated blocks (highest value of CURRENT_COUNT_USED).',"
+ "LOW_NUMBER_OF_BYTES_USED BIGINT not null comment 'Lowest number of bytes used.',"
+ "CURRENT_NUMBER_OF_BYTES_USED BIGINT not null comment 'Current number of bytes used (total allocated minus total freed).',"
+ "HIGH_NUMBER_OF_BYTES_USED BIGINT not null comment 'Highest number of bytes used.')")},
false /* perpetual */
};
diff --git a/storage/perfschema/table_replication_applier_status_by_worker.cc b/storage/perfschema/table_replication_applier_status_by_worker.cc
index 4c7ca612e0b..8b81e7eed6d 100644
--- a/storage/perfschema/table_replication_applier_status_by_worker.cc
+++ b/storage/perfschema/table_replication_applier_status_by_worker.cc
@@ -54,14 +54,14 @@ table_replication_applier_status_by_worker::m_share=
sizeof(pos_t), /* ref length */
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE replication_applier_status_by_worker("
- "CHANNEL_NAME CHAR(64) collate utf8_general_ci not null,"
- "WORKER_ID BIGINT UNSIGNED not null,"
- "THREAD_ID BIGINT UNSIGNED,"
- "SERVICE_STATE ENUM('ON','OFF') not null,"
- "LAST_SEEN_TRANSACTION CHAR(57) not null,"
- "LAST_ERROR_NUMBER INTEGER not null,"
- "LAST_ERROR_MESSAGE VARCHAR(1024) not null,"
- "LAST_ERROR_TIMESTAMP TIMESTAMP(0) not null)") },
+ "CHANNEL_NAME CHAR(64) collate utf8_general_ci not null comment 'Name of replication channel through which the transaction is received.',"
+ "WORKER_ID BIGINT UNSIGNED not null comment 'Worker identifier.,"
+ "THREAD_ID BIGINT UNSIGNED comment 'Thread_Id as displayed in the performance_schema.threads table for thread with name ''thread/sql/rpl_parallel_thread''. THREAD_ID will be NULL when worker threads are stopped due to error/force stop.',"
+ "SERVICE_STATE ENUM('ON','OFF') not null comment 'Whether or not the thread is running.',"
+ "LAST_SEEN_TRANSACTION CHAR(57) not null comment 'Last GTID executed by worker',"
+ "LAST_ERROR_NUMBER INTEGER not null comment 'Last Error that occurred on a particular worker.',"
+ "LAST_ERROR_MESSAGE VARCHAR(1024) not null comment 'Last error specific message.',"
+ "LAST_ERROR_TIMESTAMP TIMESTAMP(0) not null comment 'Time stamp of last error.')") },
false /* perpetual */
};