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

Formatting

上级 01744231
...@@ -17,8 +17,8 @@ Change Log ...@@ -17,8 +17,8 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>In version 1.4.184, "group by" ignored the table name, <ul><li>In version 1.4.184, "group by" ignored the table name,
and could pick a select column by mistake. and could pick a select column by mistake.
Example: select 0 as x from system_range(1, 2) d group by d.x; Example: select 0 as x from system_range(1, 2) d group by d.x;
</li><li>New connection setting "REUSE_SPACE" (default: true). If disabled, </li><li>New connection setting "REUSE_SPACE" (default: true). If disabled,
all changes are appended to the database file, and existing content is never overwritten. all changes are appended to the database file, and existing content is never overwritten.
......
...@@ -281,11 +281,12 @@ public class DbSettings extends SettingsBase { ...@@ -281,11 +281,12 @@ public class DbSettings extends SettingsBase {
* milliseconds before updating the database. * milliseconds before updating the database.
*/ */
public final int reconnectCheckDelay = get("RECONNECT_CHECK_DELAY", 200); public final int reconnectCheckDelay = get("RECONNECT_CHECK_DELAY", 200);
/** /**
* Database setting <code>REUSE_SPACE</code> (default: true).<br /> * Database setting <code>REUSE_SPACE</code> (default: true).<br />
* If disabled, all changes are appended to the database file, and existing * If disabled, all changes are appended to the database file, and existing
* content is never overwritten. This setting has no effect if the database is already open. * content is never overwritten. This setting has no effect if the database
* is already open.
*/ */
public final boolean reuseSpace = get("REUSE_SPACE", true); public final boolean reuseSpace = get("REUSE_SPACE", true);
......
...@@ -81,7 +81,7 @@ public class TestMVTableEngine extends TestBase { ...@@ -81,7 +81,7 @@ public class TestMVTableEngine extends TestBase {
testLocking(); testLocking();
testSimple(); testSimple();
} }
private void testAppendOnly() throws Exception { private void testAppendOnly() throws Exception {
deleteDb("testAppendOnly"); deleteDb("testAppendOnly");
Connection conn = getConnection( Connection conn = getConnection(
...@@ -97,7 +97,7 @@ public class TestMVTableEngine extends TestBase { ...@@ -97,7 +97,7 @@ public class TestMVTableEngine extends TestBase {
conn.close(); conn.close();
String fileName = getBaseDir() + "/testAppendOnly" + Constants.SUFFIX_MV_FILE; String fileName = getBaseDir() + "/testAppendOnly" + Constants.SUFFIX_MV_FILE;
long fileSize = FileUtils.size(fileName); long fileSize = FileUtils.size(fileName);
conn = getConnection( conn = getConnection(
"testAppendOnly;reuse_space=false"); "testAppendOnly;reuse_space=false");
stat = conn.createStatement(); stat = conn.createStatement();
...@@ -110,11 +110,11 @@ public class TestMVTableEngine extends TestBase { ...@@ -110,11 +110,11 @@ public class TestMVTableEngine extends TestBase {
stat.execute("select y from test where 1 = 0"); stat.execute("select y from test where 1 = 0");
stat.execute("create table test2 as select x from system_range(1, 1000)"); stat.execute("create table test2 as select x from system_range(1, 1000)");
conn.close(); conn.close();
FileChannel fc = FileUtils.open(fileName, "rw"); FileChannel fc = FileUtils.open(fileName, "rw");
// undo all changes // undo all changes
fc.truncate(fileSize); fc.truncate(fileSize);
conn = getConnection( conn = getConnection(
"testAppendOnly"); "testAppendOnly");
stat = conn.createStatement(); stat = conn.createStatement();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论