提交 d78c3fbe authored 作者: Nick's avatar Nick

Synchronized on database when unlock tables

上级 57a2c96f
......@@ -923,12 +923,14 @@ public class Session extends SessionWithState {
}
}
if (locks.size() > 0) {
// don't use the enhanced for loop to save memory
for (int i = 0, size = locks.size(); i < size; i++) {
Table t = locks.get(i);
t.unlock(this);
synchronized (database) {
// don't use the enhanced for loop to save memory
for (int i = 0, size = locks.size(); i < size; i++) {
Table t = locks.get(i);
t.unlock(this);
}
locks.clear();
}
locks.clear();
}
savepoints = null;
sessionStateChanged = true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论