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

If a CLOB or BLOB was copied into the same table using INSERT INTO X ... SELECT…

If a CLOB or BLOB was copied into the same table using INSERT INTO X ... SELECT ... FROM X, and then the original row was deleted, then the copied value was also deleted. This could also result in an ArrayIndexOutOfBoundsException on checkpoint or when closing the database.
上级 32fe58b7
......@@ -219,14 +219,6 @@ public class PageBtreeIndex extends PageIndex {
if (trace.isDebugEnabled()) {
trace.debug("{0} remove {1}", getName(), row);
}
if (tableData.getContainsLargeObject()) {
for (int i = 0, len = row.getColumnCount(); i < len; i++) {
Value v = row.getValue(i);
if (v.isLinked()) {
session.unlinkAtCommit(v);
}
}
}
// TODO invalidate row count
// setChanged(session);
if (rowCount == 1) {
......
......@@ -144,9 +144,9 @@ public class ValueLobDb extends Value implements Value.ValueClob, Value.ValueBlo
if (tableId == LobStorage.TABLE_TEMP) {
lobStorage.setTable(lobId, tabId);
this.tableId = tabId;
} else {
return lobStorage.copyLob(type, lobId, tabId, getPrecision());
}
return lobStorage.copyLob(type, lobId, tabId, getPrecision());
} else if (small.length > h.getMaxLengthInplaceLob()) {
LobStorage s = h.getLobStorage();
Value v;
......
......@@ -110,6 +110,9 @@ public class TestLob extends TestBase {
}
private void testCopyLob() throws Exception {
if (config.memory) {
return;
}
deleteDb("lob");
Connection conn;
Statement stat;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论