提交 e6c38059 authored 作者: andrei's avatar andrei

issue #1048 unlock meta

上级 a715afa5
...@@ -406,12 +406,18 @@ public class Session extends SessionWithState implements TransactionStore.Rollba ...@@ -406,12 +406,18 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
public void removeLocalTempTable(Table table) { public void removeLocalTempTable(Table table) {
// Exception thrown in org.h2.engine.Database.removeMeta if line below // Exception thrown in org.h2.engine.Database.removeMeta if line below
// is missing with TestGeneralCommonTableQueries // is missing with TestGeneralCommonTableQueries
database.lockMeta(this); boolean wasLocked = database.lockMeta(this);
try {
modificationId++; modificationId++;
localTempTables.remove(table.getName()); localTempTables.remove(table.getName());
synchronized (database) { synchronized (database) {
table.removeChildrenAndResources(this); table.removeChildrenAndResources(this);
} }
} finally {
if (!wasLocked) {
database.unlockMeta(this);
}
}
} }
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论