1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-12 01:53:02 +03:00

Fix for bug#2021: Wron error message from the client

This commit is contained in:
gluh@gluh.mysql.r18.ru
2004-02-11 12:30:20 +04:00
parent 8a409722a0
commit d5fa169fd1
2 changed files with 3 additions and 4 deletions

View File

@ -438,11 +438,7 @@ simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
if (mysql->net.vio == 0)
{ /* Do reconnect if possible */
if (mysql_reconnect(mysql))
{
net->last_errno=CR_SERVER_GONE_ERROR;
strmov(net->last_error,ER(net->last_errno));
goto end;
}
}
if (mysql->status != MYSQL_STATUS_READY)
{
@ -1610,6 +1606,8 @@ static my_bool mysql_reconnect(MYSQL *mysql)
{
/* Allov reconnect next time */
mysql->server_status&= ~SERVER_STATUS_IN_TRANS;
mysql->net.last_errno= CR_SERVER_GONE_ERROR;
strmov(mysql->net.last_error, ER(mysql->net.last_errno));
DBUG_RETURN(1);
}
mysql_init(&tmp_mysql);