-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A mysterious Packet sometimes hang around #43
Comments
An interesting aspect but I don't have the time right now to investigate is whether a bunch of the following flags are enabled on my server : https://dev.mysql.com/doc/internals/en/packet-OK_Packet.html Namely :
The Get Packet function does not seem to take these into account which might be the source of the problem. |
Hi, thanks for the overall good lib.
I created an insert function which essentially look like :
I execute it through the prepared statement API within a transaction with the following parameters :
And I get a perfectly correct answer, no trouble :
Then, I try to select something from the table :
Following the same prepared statement API.
And this fails :
I then tried a few things including getting the stack trace, which shows it's failing at the preparation level (Callstack=CallStack (from HasCallStack):\n getFromPacket, called at ./Database/MySQL/Base.hs:220:49 in mysql-haskell-0.8.4.3-FIXFr1SSHmQ8ubCZpHozx2:Database.MySQL.Base") It seems anything using the prepared statement after the initial insert fails with the same message.
It seems like a simple unexhausted InputStream from the previous query is showing up in the next query, and it pollutes the statement preparation in
Now I don't know why the initial query leeked somehow, but it seems like it should rather throw an UnconsumedResultSet anyway. It seems like the OK type is not consuming the entire InputStream Packet. I managed to workaround the problem for now by using
Before preparing a statement, but while it works, it seems highly dubious (the timeout is required otherwise if there are no packet to get, it hangs forever).
The packet in excess look like this :
I'm not sure what the proper fix should be, I suppose there's something missing equivalent to the skipToEof function for the OK returning functions like
execute
. But I didn't manage to create it properly, maybe you can help me find out the missing pieces ?The text was updated successfully, but these errors were encountered: