Commit 0737932b authored by Michael Widenius's avatar Michael Widenius

Fixed that SHOW PROCESSLIST and information_schema.processlist uses the right...

Fixed that SHOW PROCESSLIST and information_schema.processlist uses the right length for user names.
Fixed some failing tests


mysql-test/mysql-test-run.pl:
  Removed warning from mysql-test-run
mysql-test/r/create.result:
  Updated result
mysql-test/r/log_slow.result:
  Fixed failing test
mysql-test/suite/funcs_1/r/is_columns_is.result:
  Updated result
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
  Updated result
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
  Updated result
mysql-test/t/log_slow.test:
  Ensure variables are properly reset at end of test
sql/sql_show.cc:
  Fixed max length for user names
parent 5b31f878
......@@ -524,7 +524,7 @@ sub main {
}
}
if ( not defined @$completed ) {
if ( not @$completed ) {
mtr_error("Test suite aborted");
}
......
......@@ -1752,7 +1752,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`ID` bigint(4) NOT NULL DEFAULT '0',
`USER` varchar(16) NOT NULL DEFAULT '',
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
......@@ -1770,7 +1770,7 @@ show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
`ID` bigint(4) NOT NULL DEFAULT '0',
`USER` varchar(16) NOT NULL DEFAULT '',
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
......
......@@ -13,6 +13,7 @@ log_slow_filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,
log_slow_queries ON
log_slow_rate_limit 1
log_slow_verbosity
set @org_slow_query_log= @@global.slow_query_log;
set @@log_slow_filter= "filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk,admin";
select @@log_slow_filter;
@@log_slow_filter
......@@ -68,6 +69,7 @@ count(*)
1
truncate mysql.slow_log;
set @@long_query_time=default;
set global slow_query_log=default;
set global slow_query_log= @org_slow_query_log;
set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
set global log_output= default;
......@@ -230,7 +230,7 @@ def information_schema PROCESSLIST STAGE 10 0 NO tinyint NULL NULL 3 0 NULL NULL
def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) select
def information_schema PROCESSLIST TIME_MS 9 0.000 NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) select
def information_schema PROCESSLIST USER 2 NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select
def information_schema PROCESSLIST USER 2 NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select
def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select
def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
......@@ -688,7 +688,7 @@ NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21
3.0000 information_schema PLUGINS PLUGIN_MATURITY varchar 12 36 utf8 utf8_general_ci varchar(12)
3.0000 information_schema PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8 utf8_general_ci varchar(80)
NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4)
3.0000 information_schema PROCESSLIST USER varchar 16 48 utf8 utf8_general_ci varchar(16)
3.0000 information_schema PROCESSLIST USER varchar 128 384 utf8 utf8_general_ci varchar(128)
3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PROCESSLIST DB varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PROCESSLIST COMMAND varchar 16 48 utf8 utf8_general_ci varchar(16)
......
......@@ -23,7 +23,7 @@ SHOW CREATE TABLE processlist;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`ID` bigint(4) NOT NULL DEFAULT '0',
`USER` varchar(16) NOT NULL DEFAULT '',
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
......@@ -96,7 +96,7 @@ SHOW CREATE TABLE processlist;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`ID` bigint(4) NOT NULL DEFAULT '0',
`USER` varchar(16) NOT NULL DEFAULT '',
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
......
......@@ -13,7 +13,7 @@ SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`ID` bigint(4) NOT NULL DEFAULT '0',
`USER` varchar(16) NOT NULL DEFAULT '',
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
......
......@@ -6,6 +6,7 @@ select @@log_slow_filter;
select @@log_slow_rate_limit;
select @@log_slow_verbosity;
show variables like "log_slow%";
set @org_slow_query_log= @@global.slow_query_log;
# Some simple test to set log_slow_filter
set @@log_slow_filter= "filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk,admin";
......@@ -51,9 +52,9 @@ select sleep(0.5);
select count(*) FROM mysql.slow_log;
truncate mysql.slow_log;
# Reset used variables
set @@long_query_time=default;
set global slow_query_log=default;
set global slow_query_log= @org_slow_query_log;
set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
set global log_output= default;
......@@ -2163,7 +2163,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
DBUG_ENTER("mysqld_list_processes");
field_list.push_back(new Item_int("Id", 0, MY_INT32_NUM_DECIMAL_DIGITS));
field_list.push_back(new Item_empty_string("User",16));
field_list.push_back(new Item_empty_string("User", USERNAME_CHAR_LENGTH));
field_list.push_back(new Item_empty_string("Host",LIST_PROCESS_HOST_LEN));
field_list.push_back(field=new Item_empty_string("db",NAME_CHAR_LEN));
field->maybe_null=1;
......@@ -8414,7 +8414,8 @@ ST_FIELD_INFO variables_fields_info[]=
ST_FIELD_INFO processlist_fields_info[]=
{
{"ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, "Id", SKIP_OPEN_TABLE},
{"USER", 16, MYSQL_TYPE_STRING, 0, 0, "User", SKIP_OPEN_TABLE},
{"USER", USERNAME_CHAR_LENGTH, MYSQL_TYPE_STRING, 0, 0, "User",
SKIP_OPEN_TABLE},
{"HOST", LIST_PROCESS_HOST_LEN, MYSQL_TYPE_STRING, 0, 0, "Host",
SKIP_OPEN_TABLE},
{"DB", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Db", SKIP_OPEN_TABLE},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment