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

Fix for Bug#4079 "error checking in prepared statements":

reset mysql->status if there was an error in row reading.


libmysql/libmysql.c:
  Fix for bug#4079
tests/client_test.c:
  Test for bug #4079
This commit is contained in:
unknown
2004-06-11 13:12:29 +04:00
parent 267418de32
commit 4047b5ade3
2 changed files with 51 additions and 0 deletions

View File

@ -2501,6 +2501,13 @@ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row)
{
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
mysql->net.sqlstate);
/*
If there was an error, there are no more pending rows:
reset statement status to not hang up in following
mysql_stmt_close (it will try to flush result set before
closing the statement).
*/
mysql->status= MYSQL_STATUS_READY;
goto error;
}
if (!*row)