summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <reggie@bob.(none)>2005-01-15 23:19:34 -0600
committerunknown <reggie@bob.(none)>2005-01-15 23:19:34 -0600
commit31457a625861d4dc3a99990eb42c38a81b607aef (patch)
tree81eeadc9df3d2c20130e332e7c6dcbce7fa5ecc2 /client
parent193eae3bece02daa473f0e264d235ea3e407a88d (diff)
downloadmariadb-git-31457a625861d4dc3a99990eb42c38a81b607aef.tar.gz
Bug #7922 prompt \p fails on Windows for shared-memory connections
Fixed bug by adding code that displays the contents of mysql.host when \p is added as part of the prompt. mysql.cc: Added code to display mysql.host as prompt when using shared memory client/mysql.cc: Added code to display mysql.host as prompt when using shared memory BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 739cc77bd14..ebae8e636d2 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -3232,13 +3232,20 @@ static const char* construct_prompt()
break;
}
case 'p':
+ {
#ifndef EMBEDDED_LIBRARY
if (!connected)
{
processed_prompt.append("not_connected");
break;
}
- if (strstr(mysql_get_host_info(&mysql),"TCP/IP") ||
+
+ const char *host_info = mysql_get_host_info(&mysql);
+ if (strstr(host_info, "memory"))
+ {
+ processed_prompt.append( mysql.host );
+ }
+ else if (strstr(host_info,"TCP/IP") ||
!mysql.unix_socket)
add_int_to_prompt(mysql.port);
else
@@ -3247,6 +3254,7 @@ static const char* construct_prompt()
processed_prompt.append(pos ? pos+1 : mysql.unix_socket);
}
#endif
+ }
break;
case 'U':
if (!full_username)