提交 91c10438 authored 作者: Thomas Mueller's avatar Thomas Mueller

Some CLOB and BLOB values could no longer be read when the original row was…

Some CLOB and BLOB values could no longer be read when the original row was removed (even when using the MVCC mode).
上级 2a1d6a3e
...@@ -59,6 +59,7 @@ public class TestLob extends TestBase { ...@@ -59,6 +59,7 @@ public class TestLob extends TestBase {
@Override @Override
public void test() throws Exception { public void test() throws Exception {
testConcurrentRemoveRead();
testCloseLobTwice(); testCloseLobTwice();
testCleaningUpLobsOnRollback(); testCleaningUpLobsOnRollback();
testClobWithRandomUnicodeChars(); testClobWithRandomUnicodeChars();
...@@ -111,6 +112,25 @@ public class TestLob extends TestBase { ...@@ -111,6 +112,25 @@ public class TestLob extends TestBase {
FileUtils.deleteRecursive(TEMP_DIR, true); FileUtils.deleteRecursive(TEMP_DIR, true);
} }
private void testConcurrentRemoveRead() throws Exception {
deleteDb("lob");
final String url = getURL("lob", true);
Connection conn = getConnection(url);
Statement stat = conn.createStatement();
stat.execute("set max_length_inplace_lob 5");
stat.execute("create table lob(data clob)");
stat.execute("insert into lob values(space(100))");
Connection conn2 = getConnection(url);
Statement stat2 = conn2.createStatement();
ResultSet rs = stat2.executeQuery("select data from lob");
rs.next();
stat.execute("delete lob");
InputStream in = rs.getBinaryStream(1);
in.read();
conn2.close();
conn.close();
}
private void testCloseLobTwice() throws SQLException { private void testCloseLobTwice() throws SQLException {
deleteDb("lob"); deleteDb("lob");
Connection conn = getConnection("lob"); Connection conn = getConnection("lob");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论