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:
@@ -5129,7 +5129,7 @@ static const char *construct_prompt()
|
|||||||
{
|
{
|
||||||
const char *prompt;
|
const char *prompt;
|
||||||
prompt= connected ? mysql_get_host_info(&mysql) : "not_connected";
|
prompt= connected ? mysql_get_host_info(&mysql) : "not_connected";
|
||||||
if (strstr(prompt, "Localhost"))
|
if (strstr(prompt, "Localhost") || strstr(prompt, "localhost "))
|
||||||
{
|
{
|
||||||
if (*c == 'h')
|
if (*c == 'h')
|
||||||
processed_prompt.append("localhost");
|
processed_prompt.append("localhost");
|
||||||
|
Reference in New Issue
Block a user