summaryrefslogtreecommitdiff
path: root/storage/perfschema/table_threads.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/perfschema/table_threads.cc')
-rw-r--r--storage/perfschema/table_threads.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/storage/perfschema/table_threads.cc b/storage/perfschema/table_threads.cc
index 00196718113..f342b5c6601 100644
--- a/storage/perfschema/table_threads.cc
+++ b/storage/perfschema/table_threads.cc
@@ -42,20 +42,20 @@ table_threads::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
{ C_STRING_WITH_LEN("CREATE TABLE threads("
- "THREAD_ID BIGINT unsigned not null,"
- "NAME VARCHAR(128) not null,"
- "TYPE VARCHAR(10) not null,"
- "PROCESSLIST_ID BIGINT unsigned,"
- "PROCESSLIST_USER VARCHAR(" STRINGIFY_ARG(USERNAME_CHAR_LENGTH) "),"
- "PROCESSLIST_HOST VARCHAR(" STRINGIFY_ARG(HOSTNAME_LENGTH) "),"
- "PROCESSLIST_DB VARCHAR(64),"
- "PROCESSLIST_COMMAND VARCHAR(16),"
- "PROCESSLIST_TIME BIGINT,"
- "PROCESSLIST_STATE VARCHAR(64),"
- "PROCESSLIST_INFO LONGTEXT,"
- "PARENT_THREAD_ID BIGINT unsigned,"
- "ROLE VARCHAR(64),"
- "INSTRUMENTED ENUM ('YES', 'NO') not null)") }
+ "THREAD_ID BIGINT unsigned not null comment 'A unique thread identifier.',"
+ "NAME VARCHAR(128) not null comment 'Name associated with the server''s thread instrumentation code, for example thread/sql/main for the server''s main() function, and thread/sql/one_connection for a user connection.',"
+ "TYPE VARCHAR(10) not null comment 'FOREGROUND or BACKGROUND, depending on the thread type. User connection threads are FOREGROUND, internal server threads are BACKGROUND.',"
+ "PROCESSLIST_ID BIGINT unsigned comment 'The PROCESSLIST.ID value for threads displayed in the INFORMATION_SCHEMA.PROCESSLIST table, or 0 for background threads. Also corresponds with the CONNECTION_ID() return value for the thread.',"
+ "PROCESSLIST_USER VARCHAR(" STRINGIFY_ARG(USERNAME_CHAR_LENGTH) ") comment 'Foreground thread user, or NULL for a background thread.',"
+ "PROCESSLIST_HOST VARCHAR(" STRINGIFY_ARG(HOSTNAME_LENGTH) ") comment 'Foreground thread host, or NULL for a background thread.',"
+ "PROCESSLIST_DB VARCHAR(64) comment 'Thread''s default database, or NULL if none exists.',"
+ "PROCESSLIST_COMMAND VARCHAR(16) comment 'Type of command executed by the thread. These correspond to the the COM_xxx client/server protocol commands, and the Com_xxx status variables. See Thread Command Values.',"
+ "PROCESSLIST_TIME BIGINT comment 'Time in seconds the thread has been in its current state.',"
+ "PROCESSLIST_STATE VARCHAR(64) comment 'Action, event or state indicating what the thread is doing.',"
+ "PROCESSLIST_INFO LONGTEXT comment 'Statement being executed by the thread, or NULL if a statement is not being executed. If a statement results in calling other statements, such as for a stored procedure, the innermost statement from the stored procedure is shown here.',"
+ "PARENT_THREAD_ID BIGINT unsigned comment 'THREAD_ID of the parent thread, if any. Subthreads can for example be spawned as a result of INSERT DELAYED statements.',"
+ "ROLE VARCHAR(64) comment 'Unused.',"
+ "INSTRUMENTED ENUM ('YES', 'NO') not null comment 'YES or NO for Whether the thread is instrumented or not. For foreground threads, the initial value is determined by whether there''s a user/host match in the setup_actors table. Subthreads are again matched, while for background threads, this will be set to YES by default. To monitor events that the thread executes, INSTRUMENTED must be YES and the thread_instrumentation consumer in the setup_consumers table must also be YES.')") }
};
PFS_engine_table* table_threads::create()