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

Formatting

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