From ce1011669bb3f7e2173fc7fc7a8ee47dea614b0f Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Wed, 2 Nov 2016 12:19:37 +0400 Subject: [PATCH] MDEV-11175 - \H option does not replace localhost with a host name Let \H issue host name when connected to localhost via TCP/IP. --- client/mysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 65b7c192595..8ca38b48d6e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -5129,7 +5129,7 @@ static const char *construct_prompt() { const char *prompt; prompt= connected ? mysql_get_host_info(&mysql) : "not_connected"; - if (strstr(prompt, "Localhost")) + if (strstr(prompt, "Localhost") || strstr(prompt, "localhost ")) { if (*c == 'h') processed_prompt.append("localhost");