1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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)
This commit is contained in:
monty@mashka.mysql.fi
2003-02-02 05:13:09 +02:00
parent 8611ac7a9c
commit a9ee051a4d
2 changed files with 8 additions and 5 deletions

View File

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