mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02: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:
parent
267418de32
commit
4047b5ade3
2 changed files with 51 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue