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

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

reset mysql->status if there was an error in row reading.
This commit is contained in:
konstantin@mysql.com
2004-06-11 13:12:29 +04:00
parent 124c2ef4f0
commit 21c524e712
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)