Skip to content
Snippets Groups Projects
Commit aeffcb73 authored by Jared Hancock's avatar Jared Hancock
Browse files

orm: Fix MySQL occasional "Commands OOS" error

Under certain intermittent circumstances (usually a significant number of
ORM queries), the ORM will trigger a MySQL error:

Commands out of sync; you can't run this command now

Usually this MySQL error is related to buffered versus unbuffered queries.
However, the ORM already uses buffered queries (MySQL calls it
"store_result"). In this case, it appears there is some sort of race between
fetching the result metadata before configuring the statement for buffering.
(By "race" I mean that the error is not reliably triggered).

This patch seems to fix the issue by configuring buffering before fetching
result metadata — necessary to configure the fetching (output) phase of the
statement.
parent bf07dfa2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment