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

issue #1048 unlock meta

上级 a715afa5
...@@ -406,11 +406,17 @@ public class Session extends SessionWithState implements TransactionStore.Rollba ...@@ -406,11 +406,17 @@ 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);
modificationId++; try {
localTempTables.remove(table.getName()); modificationId++;
synchronized (database) { localTempTables.remove(table.getName());
table.removeChildrenAndResources(this); synchronized (database) {
table.removeChildrenAndResources(this);
}
} finally {
if (!wasLocked) {
database.unlockMeta(this);
}
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论