RaigorJiang opened a new pull request, #40232: URL: https://github.com/apache/shardingsphere/pull/40232
Fixes #40227. Binding a Go string such as `"48"` to a MySQL `BIGINT` column can return no rows through Proxy when the backend uses `useServerPrepStmts=false`, while the same query succeeds directly against MySQL. `MYSQL_TYPE_STRING` parameters are initially read as `byte[]`. The existing decoding logic converts them to Java strings only for character target columns, so numeric-column parameters reach Connector/J as binary values. Extend the target-column check to numeric types and express the character and numeric groups with a switch. This preserves string semantics and lets MySQL perform numeric conversion. Preserve existing character decoding, binary parameter handling, NULL handling, and behavior when column metadata is unavailable. ### Validation - Passed all 487 tests in the MySQL protocol module, including 49 tests in `MySQLComStmtExecutePacketTest`. - Achieved 100% line and branch coverage for `MySQLComStmtExecutePacket`. - Passed Spotless and Checkstyle for both changed Java files. - Rebuilt Proxy and verified the packaged protocol classes match the current compilation output. - Verified against MySQL 8.0.37 with Connector/J 8.4.0, manually installed in Proxy's `ext-lib`. - With backend `useServerPrepStmts=false` and `true`, passed all 12 original Go/GORM query cases per Proxy configuration, covering string and integer parameters with `Find`, `Count`, and `RawFind`. - Verified the #37993 regression path using a BIGINT/VARCHAR composite sharding key with `interpolateParams=false`. This covers the same sharding-value `Comparable` check using an existing table, rather than reproducing the original topology. - Rolled back all fixtures, confirmed no test rows remained, and stopped both temporary Proxy instances. -- 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]
