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

With version 1.3.156, the DB2 mode could not be used with CLOB and BLOB data.…

With version 1.3.156, the DB2 mode could not be used with CLOB and BLOB data. When upgrading from an older 1.3.x version to version 1.3.156, CLOB and BLOB data was lost in many cases.
上级 12b01b74
...@@ -36,6 +36,7 @@ public class TestRecovery extends TestBase { ...@@ -36,6 +36,7 @@ public class TestRecovery extends TestBase {
} }
public void test() throws Exception { public void test() throws Exception {
testRecoverClob();
testRecoverFulltext(); testRecoverFulltext();
testRedoTransactions(); testRedoTransactions();
testCorrupt(); testCorrupt();
...@@ -44,6 +45,19 @@ public class TestRecovery extends TestBase { ...@@ -44,6 +45,19 @@ public class TestRecovery extends TestBase {
testRunScript(); testRunScript();
} }
private void testRecoverClob() throws Exception {
DeleteDbFiles.execute(getBaseDir(), "recovery", true);
Connection conn = getConnection("recovery");
Statement stat = conn.createStatement();
stat.execute("create table test(id int, data clob)");
stat.execute("insert into test values(1, space(100000))");
conn.close();
Recover.main("-dir", getBaseDir(), "-db", "recovery");
DeleteDbFiles.execute(getBaseDir(), "recovery", true);
conn = getConnection("recovery;init=runscript from '" + getBaseDir() + "/recovery.h2.sql'");
conn.close();
}
private void testRecoverFulltext() throws Exception { private void testRecoverFulltext() throws Exception {
DeleteDbFiles.execute(getBaseDir(), "recovery", true); DeleteDbFiles.execute(getBaseDir(), "recovery", true);
Connection conn = getConnection("recovery"); Connection conn = getConnection("recovery");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论