aMetric opened a new pull request, #38057:
URL: https://github.com/apache/shardingsphere/pull/38057

   ## What is the purpose of the change
   
   Fixes #34289.
   
   When executing MySQL prepared statements with pagination placeholders (for 
example, `LIMIT ?` or `LIMIT ?, ?`), some clients (such as Go MySQL clients) 
may send parameter values as `byte[]` in binary protocol.
   `PaginationContext` previously assumed pagination marker values were only 
`Long` or `Integer`, 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
   
   - Refactor pagination marker conversion in:
     - `PaginationContext#getValue`
     - add `PaginationContext#getLongValue`
   - Support pagination marker values from:
     - `Number`
     - `byte[]` (parsed as UTF-8 full numeric string)
     - string-like objects via `toString()`
   - Add dedicated unit tests:
     - `PaginationContextTest#assertGetActualOffsetWithByteArrayParameters`
     - `PaginationContextTest#assertGetActualRowCountWithByteArrayParameters`
     - 
`SelectStatementContextTest#assertBindParametersPopulatePaginationContextWithByteArrayParameters`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to