Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
correct mthd_stmt_flush_unbuffered() logic
it needs to read * if we're reading resultset row packets - till the EOF (254) packet. * otherwise - till the *second* EOF packet (the first EOF will separate resultset metadata packets and resultset row packets) * or till the OK (0) packet, but not if we're reading resultset row packets (because they also start from 0). Also it needs to update server_status for caller to be able to check the SERVER_MORE_RESULTS_EXIST flag, and the stmt->state to know that it's not reading the resultset anymore. Callers were fixed to invoke mthd_stmt_flush_unbuffered() repeatedly, when they need to flush all result sets, not just one. This commit fixes unittest/libmariadb/ps.c unit test (it was failing to clean up mysql.proc table).
- Loading branch information