summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index a47d99143b6..62977ab5fb2 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1064,13 +1064,10 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
{
if ((thd_info->host= thd->alloc(LIST_PROCESS_HOST_LEN+1)))
snprintf((char *) thd_info->host, LIST_PROCESS_HOST_LEN, "%s:%u",
- (tmp->host ? tmp->host : tmp->ip), tmp->peer_port);
+ thd->host_or_ip, tmp->peer_port);
}
else
- thd_info->host= thd->strdup(tmp->host ? tmp->host :
- (tmp->ip ? tmp->ip :
- (tmp->system_thread ? "none" :
- "connecting host")));
+ thd_info->host= thd->strdup(thd->host_or_ip);
if ((thd_info->db=tmp->db)) // Safe test
thd_info->db=thd->strdup(thd_info->db);
thd_info->command=(int) tmp->command;