Skip to content

Commit e72aa99

Browse files
authored
Merge pull request #1110 from diribet/batch-executor-fix
In BatchExecutor, close each statement right after it is executed. Although proper flushing should be sufficient in most cases, this could lower the possibility of an error like "ORA-01000: maximum open cursors exceeded".
2 parents 9233556 + 9fe23dc commit e72aa99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public List<BatchResult> doFlushStatements(boolean isRollback) throws SQLExcepti
131131
keyGenerator.processAfter(this, ms, stmt, parameter);
132132
}
133133
}
134+
closeStatement(stmt);
134135
} catch (BatchUpdateException e) {
135136
StringBuilder message = new StringBuilder();
136137
message.append(batchResult.getMappedStatement().getId())

0 commit comments

Comments
 (0)