From ca2e33af814eddb8f0f9d42dba2d5d485fd0f02b Mon Sep 17 00:00:00 2001 From: Zhang Yonglun Date: Fri, 31 Jul 2020 13:33:30 +0800 Subject: [PATCH] #6527, parameters for transparent mode (#6545) * #6527, parameters for transparent mode * #6527, refine --- .../jdbc/wrapper/PreparedStatementExecutorWrapper.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/wrapper/PreparedStatementExecutorWrapper.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/wrapper/PreparedStatementExecutorWrapper.java index a407f6afe10d9..82e9ab9d60ac6 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/wrapper/PreparedStatementExecutorWrapper.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/wrapper/PreparedStatementExecutorWrapper.java @@ -43,7 +43,6 @@ import java.sql.Statement; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.List; /** @@ -66,7 +65,7 @@ public ExecutionContext execute(final String sql) { Collection rules = schema.getSchema().getRules(); if (rules.isEmpty()) { return new ExecutionContext( - new CommonSQLStatementContext(sqlStatement), new ExecutionUnit(schema.getSchema().getDataSources().keySet().iterator().next(), new SQLUnit(sql, Collections.emptyList()))); + new CommonSQLStatementContext(sqlStatement), new ExecutionUnit(schema.getSchema().getDataSources().keySet().iterator().next(), new SQLUnit(sql, parameters))); } RouteContext routeContext = new DataNodeRouter(schema.getSchema().getMetaData(), PROXY_SCHEMA_CONTEXTS.getSchemaContexts().getProps(), rules).route(sqlStatement, sql, parameters); routeMetricsCollect(routeContext, rules);