提交 3bd2d5c0 authored 作者: Thomas Mueller's avatar Thomas Mueller

Server-less multi-connection mode: two processes writing, corrupt after closing.

上级 08d945e0
...@@ -168,8 +168,10 @@ public class LogSystem { ...@@ -168,8 +168,10 @@ public class LogSystem {
/** /**
* Close all log files. * Close all log files.
*
* @param checkpoint if a checkpoint should be written
*/ */
public void close() throws SQLException { public void close(boolean checkpoint) throws SQLException {
if (database == null) { if (database == null) {
return; return;
} }
...@@ -189,7 +191,7 @@ public class LogSystem { ...@@ -189,7 +191,7 @@ public class LogSystem {
SQLException closeException = null; SQLException closeException = null;
try { try {
flushAndCloseUnused(); flushAndCloseUnused();
if (!containsInDoubtTransactions()) { if (!containsInDoubtTransactions() && checkpoint) {
checkpoint(); checkpoint();
} }
} catch (SQLException e) { } catch (SQLException e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论