提交 6138986f authored 作者: Thomas Mueller's avatar Thomas Mueller

For read-only databases, for the trace level "debug", the trace info is written…

For read-only databases, for the trace level "debug", the trace info is written to the temp directory.
上级 58cd2825
...@@ -18,7 +18,10 @@ Change Log ...@@ -18,7 +18,10 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Closing the file lock will now wait until the background thread is stopped. <ul><li>The method TableEngine.createTable() now returns a Table object.
</li><li>For read-only databases, for the trace level "debug",
the trace info is written to the temp directory.
</li><li>Closing the file lock will now wait until the background thread is stopped.
</li><li>In version 1.3.172, a performance regression was introduced when </li><li>In version 1.3.172, a performance regression was introduced when
fixing the issue 389 (when there is a multi-column primary key, fixing the issue 389 (when there is a multi-column primary key,
H2 does not seem to always pick the right index). This was related to H2 does not seem to always pick the right index). This was related to
......
...@@ -534,7 +534,12 @@ public class Database implements DataHandler { ...@@ -534,7 +534,12 @@ public class Database implements DataHandler {
readOnly = true; readOnly = true;
} }
if (readOnly) { if (readOnly) {
traceSystem = new TraceSystem(null); if (traceLevelFile >= TraceSystem.DEBUG) {
String traceFile = Utils.getProperty("java.io.tmpdir", ".") + "/" + "h2_" + System.currentTimeMillis();
traceSystem = new TraceSystem(traceFile + Constants.SUFFIX_TRACE_FILE);
} else {
traceSystem = new TraceSystem(null);
}
} else { } else {
traceSystem = new TraceSystem(databaseName + Constants.SUFFIX_TRACE_FILE); traceSystem = new TraceSystem(databaseName + Constants.SUFFIX_TRACE_FILE);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论