You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/06/03 12:40:11 UTC
[GitHub] [shardingsphere] TeslaCN commented on a change in pull request #10642: fix calcite parse error when sql include semicolon
TeslaCN commented on a change in pull request #10642:
URL: https://github.com/apache/shardingsphere/pull/10642#discussion_r644757225
##########
File path: shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/federate/execute/FederateJDBCExecutor.java
##########
@@ -82,7 +82,7 @@ public ResultSet getResultSet() throws SQLException {
}
private ResultSet execute(final String sql, final List<Object> parameters) throws SQLException {
- PreparedStatement statement = getConnection().prepareStatement(sql);
+ PreparedStatement statement = getConnection().prepareStatement(sql.replace(";", ""));
Review comment:
What if the SQL contains a string contains `;`?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org