This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new dfe83126408 Add database type parameter to SQLBindEngine.bind method 
(#35511)
dfe83126408 is described below

commit dfe831264086467c31708d06cd3bf165a439312c
Author: Liang Zhang <[email protected]>
AuthorDate: Sun May 25 22:28:25 2025 +0800

    Add database type parameter to SQLBindEngine.bind method (#35511)
    
    * Optimize MySQL multi-statements handling
    
    - Extract DatabaseType instance as a private field to improve performance
    - Update SQLParserEngine initialization to use the pre-loaded DatabaseType
    - Modify SQLBindEngine invocation to include DatabaseType as a parameter
    
    * Add database type parameter to SQLBindEngine.bind method
    - Update the SQLBindEngine.bind method call to include the databaseType 
parameter
    - This change ensures that the database type is properly passed during SQL 
statement binding
---
 .../executor/enumerable/implementor/EnumerableScanImplementor.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/implementor/EnumerableScanImplementor.java
 
b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/implementor/EnumerableScanImplementor.java
index 7d569fd774c..c442ca7ed90 100644
--- 
a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/implementor/EnumerableScanImplementor.java
+++ 
b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/implementor/EnumerableScanImplementor.java
@@ -206,7 +206,7 @@ public final class EnumerableScanImplementor implements 
ScanImplementor {
         SQLStatement sqlStatement = 
compilerContext.getSqlParserRule().getSQLParserEngine(databaseType).parse(sql, 
useCache);
         List<Object> params = getParameters(sqlString.getParamIndexes());
         HintValueContext hintValueContext = new HintValueContext();
-        SQLStatementContext sqlStatementContext = new SQLBindEngine(metaData, 
executorContext.getCurrentDatabaseName(), hintValueContext).bind(sqlStatement, 
params);
+        SQLStatementContext sqlStatementContext = new SQLBindEngine(metaData, 
executorContext.getCurrentDatabaseName(), hintValueContext).bind(databaseType, 
sqlStatement, params);
         return new QueryContext(sqlStatementContext, sql, params, 
hintValueContext, queryContext.getConnectionContext(), metaData, useCache);
     }
     

Reply via email to