Skip to content

Commit 9fe23dc

Browse files
statements are closed in case of exception
1 parent a38e44f commit 9fe23dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/apache/ibatis/executor/BatchExecutor.java

+3
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ public List<BatchResult> doFlushStatements(boolean isRollback) throws SQLExcepti
150150
}
151151
return results;
152152
} finally {
153+
for (Statement stmt : statementList) {
154+
closeStatement(stmt);
155+
}
153156
currentSql = null;
154157
statementList.clear();
155158
batchResultList.clear();

0 commit comments

Comments
 (0)