Open
Conversation
Ref: trilogy-libraries#189 This is the most basic API possible and uses a hack, but it demonstrate that it's possible to do pipelining with MySQL API.
casperisfine
commented
Aug 7, 2024
|
|
||
| VALUE results = rb_ary_new2(count); | ||
| for (index = 0; index < count; index++) { | ||
| ctx->conn.packet_parser.sequence_number = 1; // HACK |
Contributor
Author
There was a problem hiding this comment.
I'm not sure if the sequence number can really be assumed to be always 1. From what I could see it's the case, but we could also record the sequence number of each query.
Collaborator
There was a problem hiding this comment.
Won't be 1 if the query is long enough to span multiple MySQL packets (e.g. connection.query('x' * 0xFFFFFE) will write 2 MySQL packets, so we'd need the sequence number here to be 2).
Contributor
Author
There was a problem hiding this comment.
Right, I think we need to store these values in an array somewhere to restore them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref: #189
This is the most basic API possible and uses a hack, but it demonstrate that it's possible to do pipelining with MySQL API.