From 4ba691b03c90c3d3af5445ef177fbbbd63efa8e7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Oct 2006 15:08:25 +0500 Subject: [PATCH] Fix for bug #22723: Host field blank when server started with skip-grant We set 'host_or_ip' to "" in the Security_context::skip_grants(). sql/sql_show.cc: Fix for bug #22723: Host field blank when server started with skip-grant - as we set 'host_or_ip' to "" if skip-grant, use 'host' instead. --- sql/sql_show.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index eb78f4fbdae..2240601a661 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1323,7 +1323,9 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) "%s:%u", tmp_sctx->host_or_ip, tmp->peer_port); } else - thd_info->host= thd->strdup(tmp_sctx->host_or_ip); + thd_info->host= thd->strdup(tmp_sctx->host_or_ip[0] ? + tmp_sctx->host_or_ip : + tmp_sctx->host ? tmp_sctx->host : ""); if ((thd_info->db=tmp->db)) // Safe test thd_info->db=thd->strdup(thd_info->db); thd_info->command=(int) tmp->command;