|
Sorry, that got a bit munged. I've attached a file with the patch. Thanks, Eric On 02/03/2016 03:47 PM, Eric Faulhaber
wrote:
Hello, -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout. |
diff --git a/h2/src/main/org/h2/engine/Session.java b/h2/src/main/org/h2/engine/Session.java
index 215d814..4161c72 100644
--- a/h2/src/main/org/h2/engine/Session.java
+++ b/h2/src/main/org/h2/engine/Session.java
@@ -928,11 +928,13 @@ public class Session extends SessionWithState {
private void cleanTempTables(boolean closeSession) {
if (localTempTables != null && localTempTables.size() > 0) {
synchronized (database) {
- for (Table table : New.arrayList(localTempTables.values())) {
+ Iterator<Table> itr = localTempTables.values().iterator();
+ while (itr.hasNext()) {
+ Table table = itr.next();
if (closeSession || table.getOnCommitDrop()) {
modificationId++;
table.setModified();
- localTempTables.remove(table.getName());
+ itr.remove();
table.removeChildrenAndResources(this);
if (closeSession) {
// need to commit, otherwise recovery might
