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:
@ -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)
|
||||
|
Reference in New Issue
Block a user