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

Synchronized on database when unlock tables

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