Commit 17613530 authored by unknown's avatar unknown

A fix for SHOW PROCESSLIST bug

parent d98ff9ef
...@@ -1064,10 +1064,10 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) ...@@ -1064,10 +1064,10 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
{ {
if ((thd_info->host= thd->alloc(LIST_PROCESS_HOST_LEN+1))) if ((thd_info->host= thd->alloc(LIST_PROCESS_HOST_LEN+1)))
my_snprintf((char *) thd_info->host, LIST_PROCESS_HOST_LEN, my_snprintf((char *) thd_info->host, LIST_PROCESS_HOST_LEN,
"%s:%u", thd->host_or_ip, tmp->peer_port); "%s:%u", tmp->host_or_ip, tmp->peer_port);
} }
else else
thd_info->host= thd->strdup(thd->host_or_ip); thd_info->host= thd->strdup(tmp->host_or_ip);
if ((thd_info->db=tmp->db)) // Safe test if ((thd_info->db=tmp->db)) // Safe test
thd_info->db=thd->strdup(thd_info->db); thd_info->db=thd->strdup(thd_info->db);
thd_info->command=(int) tmp->command; thd_info->command=(int) tmp->command;
......
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