mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-4911 - add KILL query id, and add query id information to processlist
It is now possible to kill query by query id. KILL syntax was extended to: KILL [HARD | SOFT] [CONNECTION | QUERY [ID query_id]] [thread_id | USER user_name] Added QUERY_ID column to INFORMATION_SCHEMA.PROCESSLIST. Fixed tests affected by this change: - added PROCESSLIST.QUERY_ID column - ID is now keyword and is quoted in SHOW CREATE TABLE output - PFS statement digest is calculated basing on token id (not token text). Token id has shifted for keywords residing after ID in keywords array.
This commit is contained in:
@ -2613,6 +2613,9 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
|
||||
table->field[13]->store((longlong) tmp->examined_row_count, TRUE);
|
||||
table->field[13]->set_notnull();
|
||||
|
||||
/* QUERY_ID */
|
||||
table->field[14]->store(tmp->query_id, TRUE);
|
||||
|
||||
if (schema_table_store_record(thd, table))
|
||||
{
|
||||
mysql_mutex_unlock(&LOCK_thread_count);
|
||||
@ -8656,6 +8659,7 @@ ST_FIELD_INFO processlist_fields_info[]=
|
||||
SKIP_OPEN_TABLE},
|
||||
{"MEMORY_USED", 7, MYSQL_TYPE_LONG, 0, 0, "Memory_used", SKIP_OPEN_TABLE},
|
||||
{"EXAMINED_ROWS", 7, MYSQL_TYPE_LONG, 0, 0, "Examined_rows", SKIP_OPEN_TABLE},
|
||||
{"QUERY_ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, 0, SKIP_OPEN_TABLE},
|
||||
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user