Skip to content

Commit

Permalink
#6527, parameters for transparent mode (#6545)
Browse files Browse the repository at this point in the history
* #6527, parameters for transparent mode

* #6527, refine
  • Loading branch information
tuohai666 authored Jul 31, 2020
1 parent fe9734d commit ca2e33a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
Expand All @@ -66,7 +65,7 @@ public ExecutionContext execute(final String sql) {
Collection<ShardingSphereRule> 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);
Expand Down

0 comments on commit ca2e33a

Please sign in to comment.