diff options
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r-- | libmysql/libmysql.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index cb20c5181a8..99fa0299de9 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -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; } |