提交 a8f92255 authored 作者: Thomas Mueller's avatar Thomas Mueller

Opening a database with both multi-threaded mode and lock mode 0 (disable…

Opening a database with both multi-threaded mode and lock mode 0 (disable locking) was possible (but only once), even thought it does not work properly.
上级 5a1fa29c
...@@ -1935,10 +1935,16 @@ public class Database implements DataHandler { ...@@ -1935,10 +1935,16 @@ public class Database implements DataHandler {
} }
public void setMultiThreaded(boolean multiThreaded) { public void setMultiThreaded(boolean multiThreaded) {
if (multiThreaded && multiVersion && this.multiThreaded != multiThreaded) { if (multiThreaded && this.multiThreaded != multiThreaded) {
if (multiVersion) {
// currently the combination of MVCC and MULTI_THREADED is not supported // currently the combination of MVCC and MULTI_THREADED is not supported
throw DbException.get(ErrorCode.CANNOT_CHANGE_SETTING_WHEN_OPEN_1, "MVCC & MULTI_THREADED"); throw DbException.get(ErrorCode.CANNOT_CHANGE_SETTING_WHEN_OPEN_1, "MVCC & MULTI_THREADED");
} }
if (lockMode == 0) {
// currently the combination of LOCK_MODE=0 and MULTI_THREADED is not supported
throw DbException.get(ErrorCode.CANNOT_CHANGE_SETTING_WHEN_OPEN_1, "LOCK_MODE=0 & MULTI_THREADED");
}
}
this.multiThreaded = multiThreaded; this.multiThreaded = multiThreaded;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论