mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix for a bug #6996
BitKeeper/etc/ignore: Added analyse.test client/mysqladmin.c to the ignore list libmysql/libmysql.c: Fix for a bug #6996 This fix enables that after all rows are read from a buffered result, mysql_stmt_data_seek(stmt,0) can rewind a counter to the beginning, so that rows can be re-fetched. tests/client_test.c: Addition of a test for fix of the bug #6996 in client_test.c
This commit is contained in:
@ -4413,6 +4413,12 @@ mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row)
|
||||
for (; tmp && row; --row, tmp= tmp->next)
|
||||
;
|
||||
stmt->data_cursor= tmp;
|
||||
if (!row && tmp)
|
||||
{
|
||||
/* Rewind the counter */
|
||||
stmt->read_row_func= stmt_read_row_buffered;
|
||||
stmt->state= MYSQL_STMT_EXECUTE_DONE;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user