1fanwang opened a new pull request, #67306:
URL: https://github.com/apache/doris/pull/67306

   ### What problem does this PR solve?
   
   Issue Number: closes https://github.com/apache/doris/issues/67301
   
   Related PR: N/A
   
   Problem Summary:
   
   MySQL Connector/ODBC sends wide-character prepared-statement values with 
MySQL's `BLOB` type code. Doris rejects the parameter before statement 
execution with `AnalysisException: Unsupported MySQL type: BLOB`.
   
   All four protocol-equivalent BLOB types now use the existing length-encoded 
string decoder. The unit test covers Unicode text and verifies that decoding 
consumes only the parameter payload.
   
   ### Release note
   
   Prepared statements now accept string parameters sent with MySQL BLOB type 
codes.
   
   ### Check List (For Author)
   
   - Test
       - [x] Unit Test
   
   <details>
   <summary>Raw test output</summary>
   
   ```console
   $ git restore --source=2689e0d7fdb111bf822cebc26d7d5765a563e276 -- \
       
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/Literal.java
   $ ./run-fe-ut.sh --run 
org.apache.doris.nereids.trees.expressions.LiteralTest#testMysqlBlobParameter
   Unexpected exception thrown: 
org.apache.doris.nereids.exceptions.AnalysisException: Unsupported MySQL type: 
BLOB
   Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
   BUILD FAILURE
   
   $ git restore --source=HEAD -- \
       
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/Literal.java
   $ ./run-fe-ut.sh --run 
org.apache.doris.nereids.trees.expressions.LiteralTest#testMysqlBlobParameter
   Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
   BUILD SUCCESS
   ```
   
   </details>
   
   - Behavior changed:
       - [x] Yes. Prepared statements accept length-encoded BLOB parameters as 
string literals.
   
   - Does this need documentation?
       - [x] No.
   
   ### Check List (For Reviewer who merge this PR)
   
   - Confirm the release note.
   - Confirm the test case.
   - Confirm documentation impact.
   - Add a branch-pick label if needed.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to