summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorramil/ram@mysql.com/myoffice.izhnet.ru <>2006-10-20 15:08:25 +0500
committerramil/ram@mysql.com/myoffice.izhnet.ru <>2006-10-20 15:08:25 +0500
commit0bbae9b3c5eefa155d15ff35e2485303b71f435b (patch)
tree5d5d41b77f5165e9219b2c665712c73185c88168 /sql/sql_show.cc
parent5a510c7299f1675b054705a190c9e0e81af4a2b6 (diff)
downloadmariadb-git-0bbae9b3c5eefa155d15ff35e2485303b71f435b.tar.gz
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().
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc4
1 files changed, 3 insertions, 1 deletions
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;