1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-7807 information_schema.processlist truncates queries with binary strings

Adding a new column INFORMATION_SCHEMA.PROCESSLIST.INFO_BINARY.
This commit is contained in:
Alexander Barkov
2015-05-08 00:34:06 +04:00
parent 0fcc350f73
commit 91ee98a8c8
8 changed files with 164 additions and 107 deletions

View File

@ -2833,6 +2833,15 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
/* QUERY_ID */
table->field[14]->store(tmp->query_id, TRUE);
/* INFO_BINARY */
if (tmp->query())
{
table->field[15]->store(tmp->query(),
MY_MIN(PROCESS_LIST_INFO_WIDTH,
tmp->query_length()), &my_charset_bin);
table->field[15]->set_notnull();
}
if (schema_table_store_record(thd, table))
{
mysql_mutex_unlock(&LOCK_thread_count);
@ -8620,6 +8629,8 @@ ST_FIELD_INFO processlist_fields_info[]=
{"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},
{"INFO_BINARY", PROCESS_LIST_INFO_WIDTH, MYSQL_TYPE_BLOB, 0, 1,
"Info_binary", SKIP_OPEN_TABLE},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
};