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

duanzhengqiang 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 a233a93f30c Merge to 03c797f (#32450)
a233a93f30c is described below

commit a233a93f30c7222657d7a1612c6c3441be411cd8
Author: Liang Zhang <zhangli...@apache.org>
AuthorDate: Sat Aug 10 14:43:44 2024 +0800

    Merge to 03c797f (#32450)
---
 .../proxy/backend/connector/AdvancedProxySQLExecutor.java            | 5 ++++-
 .../shardingsphere/proxy/backend/connector/DatabaseConnector.java    | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/AdvancedProxySQLExecutor.java
 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/AdvancedProxySQLExecutor.java
index c931aa3c21b..de61474c9ab 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/AdvancedProxySQLExecutor.java
+++ 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/AdvancedProxySQLExecutor.java
@@ -21,6 +21,7 @@ import 
org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext;
 import 
org.apache.shardingsphere.infra.executor.sql.execute.result.ExecuteResult;
 import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
 
+import java.sql.SQLException;
 import java.util.List;
 
 /**
@@ -33,7 +34,9 @@ public interface AdvancedProxySQLExecutor {
      * Execute.
      *
      * @param executionContext execution context
+     * @param databaseConnector database connector
      * @return execute result
+     * @throws SQLException SQL exception
      */
-    List<ExecuteResult> execute(ExecutionContext executionContext);
+    List<ExecuteResult> execute(ExecutionContext executionContext, 
DatabaseConnector databaseConnector) throws SQLException;
 }
diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
index 140aa9f1cde..6e26b6e18e7 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
+++ 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
@@ -240,7 +240,7 @@ public final class DatabaseConnector implements 
DatabaseBackendHandler {
         }
         proxySQLExecutor.checkExecutePrerequisites(executionContext);
         Collection<AdvancedProxySQLExecutor> advancedExecutors = 
ShardingSphereServiceLoader.getServiceInstances(AdvancedProxySQLExecutor.class);
-        List<ExecuteResult> executeResults = advancedExecutors.isEmpty() ? 
proxySQLExecutor.execute(executionContext) : 
advancedExecutors.iterator().next().execute(executionContext);
+        List<ExecuteResult> executeResults = advancedExecutors.isEmpty() ? 
proxySQLExecutor.execute(executionContext) : 
advancedExecutors.iterator().next().execute(executionContext, this);
         
getMetaDataRefreshEngine().refresh(queryContext.getSqlStatementContext(), 
executionContext.getRouteContext().getRouteUnits());
         Object executeResultSample = executeResults.iterator().next();
         return executeResultSample instanceof QueryResult

Reply via email to