提交 992fd176 authored 作者: Thomas Mueller's avatar Thomas Mueller

LOB storage: LOBs added with "h2.lobInDatabase" enabled couldn't be read later…

LOB storage: LOBs added with "h2.lobInDatabase" enabled couldn't be read later with this option disabled.
上级 48e23cb7
...@@ -18,7 +18,9 @@ Change Log ...@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>- <ul><li>JdbcConnectionPool: the default connection timeout is now 30 seconds (it used to be 5 minutes).
</li><li>LOB storage: LOBs added with "h2.lobInDatabase" enabled couldn't
be read later with this option disabled.
</li></ul> </li></ul>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
......
...@@ -595,7 +595,9 @@ public class Database implements DataHandler { ...@@ -595,7 +595,9 @@ public class Database implements DataHandler {
addDefaultSetting(systemSession, SetTypes.CLUSTER, Constants.CLUSTERING_DISABLED, 0); addDefaultSetting(systemSession, SetTypes.CLUSTER, Constants.CLUSTERING_DISABLED, 0);
addDefaultSetting(systemSession, SetTypes.WRITE_DELAY, null, Constants.DEFAULT_WRITE_DELAY); addDefaultSetting(systemSession, SetTypes.WRITE_DELAY, null, Constants.DEFAULT_WRITE_DELAY);
addDefaultSetting(systemSession, SetTypes.CREATE_BUILD, null, Constants.BUILD_ID); addDefaultSetting(systemSession, SetTypes.CREATE_BUILD, null, Constants.BUILD_ID);
getLobStorage().init(); if (SysProperties.LOB_IN_DATABASE) {
getLobStorage().init();
}
systemSession.commit(true); systemSession.commit(true);
traceSystem.getTrace(Trace.DATABASE).info("opened " + databaseName); traceSystem.getTrace(Trace.DATABASE).info("opened " + databaseName);
afterWriting(); afterWriting();
...@@ -2251,13 +2253,10 @@ public class Database implements DataHandler { ...@@ -2251,13 +2253,10 @@ public class Database implements DataHandler {
} }
public Connection getLobConnection() { public Connection getLobConnection() {
if (SysProperties.LOB_IN_DATABASE) { String url = Constants.CONN_URL_INTERNAL;
String url = Constants.CONN_URL_INTERNAL; JdbcConnection conn = new JdbcConnection(systemSession, systemUser.getName(), url);
JdbcConnection conn = new JdbcConnection(systemSession, systemUser.getName(), url); conn.setTraceLevel(TraceSystem.OFF);
conn.setTraceLevel(TraceSystem.OFF); return conn;
return conn;
}
return null;
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论