From f6073b273501227b5b6b967aa0c610cf7408940a Mon Sep 17 00:00:00 2001 From: "aivanov@mysql.com" <> Date: Tue, 2 May 2006 23:08:22 +0400 Subject: [PATCH] WL#3148: Modifying sizes of i_s.processlist columns ('time', 'info'). --- mysql-test/r/information_schema.result | 1 + sql/mysql_priv.h | 2 ++ sql/sql_show.cc | 11 ++++------- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 5e915b5742c..967507740be 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -759,6 +759,7 @@ information_schema PARTITIONS PARTITION_EXPRESSION information_schema PARTITIONS SUBPARTITION_EXPRESSION information_schema PARTITIONS PARTITION_DESCRIPTION information_schema PLUGINS PLUGIN_DESCRIPTION +information_schema PROCESSLIST INFO information_schema ROUTINES ROUTINE_DEFINITION information_schema ROUTINES SQL_MODE information_schema TRIGGERS ACTION_CONDITION diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index bc398b3d20a..749a968a5af 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -177,6 +177,8 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset; /* Characters shown for the command in 'show processlist' */ #define PROCESS_LIST_WIDTH 100 +/* Characters shown for the command in 'information_schema.processlist' */ +#define PROCESS_LIST_INFO_WIDTH 65535 /* Time handling defaults */ #define TIMESTAMP_MAX_YEAR 2038 diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 95433828a1e..9976f0e1cfa 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1553,15 +1553,11 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond) TABLE *table= tables->table; CHARSET_INFO *cs= system_charset_info; char *user; - bool verbose; - ulong max_query_length; time_t now= time(0); DBUG_ENTER("fill_process_list"); user= thd->security_ctx->master_access & PROCESS_ACL ? NullS : thd->security_ctx->priv_user; - verbose= thd->lex->verbose; - max_query_length= PROCESS_LIST_WIDTH; VOID(pthread_mutex_lock(&LOCK_thread_count)); @@ -1645,7 +1641,8 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond) if (tmp->query) { table->field[7]->store(tmp->query, - min(max_query_length, tmp->query_length), cs); + min(PROCESS_LIST_INFO_WIDTH, + tmp->query_length), cs); table->field[7]->set_notnull(); } @@ -5096,9 +5093,9 @@ ST_FIELD_INFO processlist_fields_info[]= {"HOST", LIST_PROCESS_HOST_LEN, MYSQL_TYPE_STRING, 0, 0, "Host"}, {"DB", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Db"}, {"COMMAND", 16, MYSQL_TYPE_STRING, 0, 0, "Command"}, - {"TIME", 4, MYSQL_TYPE_LONG, 0, 0, "Time"}, + {"TIME", 7, MYSQL_TYPE_LONG, 0, 0, "Time"}, {"STATE", 30, MYSQL_TYPE_STRING, 0, 1, "State"}, - {"INFO", PROCESS_LIST_WIDTH, MYSQL_TYPE_STRING, 0, 1, "Info"}, + {"INFO", PROCESS_LIST_INFO_WIDTH, MYSQL_TYPE_STRING, 0, 1, "Info"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} };