You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set stmt->bind_result_done = 0 when freeing the result buffers that were bound to a statement handle
If the statement handle was previously used, and so mysql_stmt_bind_result was
called, and if that result set and bind buffers were freed, MySQL still thinks
the result set buffer is available and will prefetch the first result in
mysql_stmt_execute. This will corrupt or crash the program.
By setting bind_result_done back to 0, we make MySQL think that a result set
has never been bound to this statement handle before to prevent the prefetch.
Is this a MySQL bug or a problem in the workflow, i.e. should a result buffer
be allocated and bound once and then never "unbound" from a statement handle?
0 commit comments