handle byte[] pagination parameters in PaginationContext(#34289)#38057
Merged
terrymanu merged 3 commits intoapache:masterfrom Feb 17, 2026
Merged
handle byte[] pagination parameters in PaginationContext(#34289)#38057terrymanu merged 3 commits intoapache:masterfrom
terrymanu merged 3 commits intoapache:masterfrom
Conversation
Member
|
Please fix spotless for code format |
Contributor
Author
|
Hi @terrymanu , Happy New Year! 🎉 I've fixed the code format with Spotless. Please review when you have time. Thanks! |
terrymanu
approved these changes
Feb 17, 2026
Member
|
@aMetric Happy New Year! 🎉 |
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.
What is the purpose of the change
Fixes #34289.
When executing MySQL prepared statements with pagination placeholders (for example,
LIMIT ?orLIMIT ?, ?), some clients (such as Go MySQL clients) may send parameter values asbyte[]in binary protocol.PaginationContextpreviously assumed pagination marker values were onlyLongorInteger, which could cause runtime failures in the proxy execution path.This PR makes pagination parameter conversion robust for binary-protocol inputs without changing normal numeric behavior.
Brief changelog
PaginationContext#getValuePaginationContext#getLongValueNumberbyte[](parsed as UTF-8 full numeric string)toString()PaginationContextTest#assertGetActualOffsetWithByteArrayParametersPaginationContextTest#assertGetActualRowCountWithByteArrayParametersSelectStatementContextTest#assertBindParametersPopulatePaginationContextWithByteArrayParameters