提交 8dc39601 authored 作者: Thomas Mueller's avatar Thomas Mueller

Page store: inserting very large rows failed with ArrayIndexOutOfBoundsException.

上级 08b5512f
......@@ -36,6 +36,7 @@ public class TestPageStore extends TestBase implements DatabaseEventListener {
}
public void test() throws Exception {
testLargeInserts();
testAutoConvert();
testLargeDatabaseFastOpen();
testUniqueIndexReopen();
......@@ -51,6 +52,20 @@ public class TestPageStore extends TestBase implements DatabaseEventListener {
testFuzzOperations();
}
private void testLargeInserts() throws SQLException {
if (config.memory) {
return;
}
deleteDb("pageStore");
Connection conn;
conn = getConnection("pageStore;PAGE_STORE=TRUE");
Statement stat = conn.createStatement();
stat.execute("create table test(data varchar)");
stat.execute("insert into test values(space(1024 * 1024))");
stat.execute("insert into test values(space(1024 * 1024))");
conn.close();
}
private void testAutoConvert() throws SQLException {
if (config.memory) {
return;
......@@ -142,11 +157,9 @@ public class TestPageStore extends TestBase implements DatabaseEventListener {
conn = DriverManager.getConnection(url);
conn.createStatement().execute("select * from test");
conn.close();
// the database is automatically converted
conn = DriverManager.getConnection(url + ";PAGE_STORE=TRUE");
conn.createStatement().execute("create table test(id int) as select 2");
conn.close();
conn = DriverManager.getConnection(url);
this.assertResult("2", conn.createStatement(), "select * from test");
assertResult("1", conn.createStatement(), "select * from test");
conn.close();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论