Skip to content

Commit

Permalink
Merge pull request #1050 from KomachiSion/dev
Browse files Browse the repository at this point in the history
for #372, clear routedStatements in ShardingPreparedStatement before …
  • Loading branch information
terrymanu authored Jul 25, 2018
2 parents ae89665 + c811b6f commit 7807eef
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public ShardingPreparedStatement(final ShardingConnection connection, final Stri

@Override
public ResultSet executeQuery() throws SQLException {
routedStatements.clear();
ResultSet result;
try {
Collection<PreparedStatementUnit> preparedStatementUnits = route();
Expand All @@ -150,6 +151,7 @@ public ResultSet executeQuery() throws SQLException {

@Override
public int executeUpdate() throws SQLException {
routedStatements.clear();
try {
Collection<PreparedStatementUnit> preparedStatementUnits = route();
return new PreparedStatementExecutor(
Expand All @@ -164,6 +166,7 @@ public int executeUpdate() throws SQLException {

@Override
public boolean execute() throws SQLException {
routedStatements.clear();
try {
Collection<PreparedStatementUnit> preparedStatementUnits = route();
return new PreparedStatementExecutor(
Expand Down

0 comments on commit 7807eef

Please sign in to comment.