summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2004-02-11 12:30:20 +0400
committerunknown <gluh@gluh.mysql.r18.ru>2004-02-11 12:30:20 +0400
commit478d4021171f23df8483f971bc1c3caa975c9831 (patch)
tree38847cf26d2badf066fcb3a3a3507af1fe25c20f /libmysql
parentcf2ecf37026b89640f539f2dc34a1d2f63501918 (diff)
downloadmariadb-git-478d4021171f23df8483f971bc1c3caa975c9831.tar.gz
Fix for bug#2021: Wron error message from the client
BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index c50193c5e2c..eff8c87ee3f 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -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);