diff options
author | unknown <monty@mashka.mysql.fi> | 2003-02-02 05:13:09 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-02-02 05:13:09 +0200 |
commit | 9ae3202e21a143c61904c2be96c70d0904988350 (patch) | |
tree | 26739b72304f595a013bbe69f5fc4c317670935a /client | |
parent | 9c356bf43c65c3ec5a89d1dfa0a03aca693864d1 (diff) | |
download | mariadb-git-9ae3202e21a143c61904c2be96c70d0904988350.tar.gz |
Fixed core dump bug in 'mysql' when using \p in prompt on Windows.
Fixed error when mysql_unix_port pointed to const string (not uncommon on windows)
client/mysql.cc:
Fixed core dump bug when using \p in prompt on Windows.
sql/mysqld.cc:
Fixed error when mysql_unix_port pointed to const string.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 62bdbe15b46..5f84261bd82 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -40,7 +40,7 @@ #include <signal.h> #include <violite.h> -const char *VER= "12.17"; +const char *VER= "12.18"; /* Don't try to make a nice table if the data is too big */ #define MAX_COLUMN_LENGTH 1024 @@ -2647,7 +2647,10 @@ static const char* construct_prompt() ! mysql.unix_socket) add_int_to_prompt(mysql.port); else - processed_prompt.append(strrchr(mysql.unix_socket,'/')+1); + { + char *pos=strrchr(mysql.unix_socket,'/'); + processed_prompt.append(pos ? pos+1 : mysql.unix_socket); + } break; case 'U': if (!full_username) |