提交 d6ffbca2 authored 作者: noelgrandin's avatar noelgrandin

Fix ConcurrentModificationException when creating tables and executing SHOW…

Fix ConcurrentModificationException when creating tables and executing SHOW TABLES in parallel. Reported by vvoytovych@llnw.com.
上级 02846b7b
...@@ -35,6 +35,7 @@ Change Log ...@@ -35,6 +35,7 @@ Change Log
</li><li>Fix ABBA deadlock between adding a constraint and the H2-Log-Writer thread. </li><li>Fix ABBA deadlock between adding a constraint and the H2-Log-Writer thread.
</li><li>Optimize IN(...) queries where the values are constant and of the same type. </li><li>Optimize IN(...) queries where the values are constant and of the same type.
</li><li>Restore tool: the parameter "quiet" was not used and is now removed. </li><li>Restore tool: the parameter "quiet" was not used and is now removed.
</li><li>Fix ConcurrentModificationException when creating tables and executing SHOW TABLES in parallel. Reported by vvoytovych@llnw.com.
</li></ul> </li></ul>
<h2>Version 1.3.169 (2012-09-09)</h2> <h2>Version 1.3.169 (2012-09-09)</h2>
......
...@@ -510,7 +510,9 @@ public class Schema extends DbObjectBase { ...@@ -510,7 +510,9 @@ public class Schema extends DbObjectBase {
* @return a (possible empty) list of all objects * @return a (possible empty) list of all objects
*/ */
public ArrayList<Table> getAllTablesAndViews() { public ArrayList<Table> getAllTablesAndViews() {
return New.arrayList(tablesAndViews.values()); synchronized (database) {
return New.arrayList(tablesAndViews.values());
}
} }
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论