1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-11175 - \H option does not replace localhost with a host name

Let \H issue host name when connected to localhost via TCP/IP.
This commit is contained in:
Sergey Vojtovich
2016-11-02 12:19:37 +04:00
parent 23cb94f04c
commit ce1011669b

View File

@@ -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");