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

The BLOB / CLOB data was dropped a little bit before the table was dropped. This…

The BLOB / CLOB data was dropped a little bit before the table was dropped. This could cause "lob not found" errors when the process was killed while a table was dropped.
上级 d1842ffa
......@@ -362,6 +362,8 @@ public class PageDataIndex extends PageIndex {
store.logTruncate(session, tableData.getId());
removeAllRows();
if (tableData.getContainsLargeObject() && tableData.isPersistData()) {
// unfortunately, the data is gone on rollback
session.commit(false);
database.getLobStorage().removeAllForTable(table.getId());
}
if (multiVersion) {
......
......@@ -653,6 +653,11 @@ public class RegularTable extends TableBase {
}
public void removeChildrenAndResources(Session session) {
if (containsLargeObject) {
// unfortunately, the data is gone on rollback
truncate(session);
database.getLobStorage().removeAllForTable(getId());
}
super.removeChildrenAndResources(session);
// go backwards because database.removeIndex will call table.removeIndex
while (indexes.size() > 1) {
......@@ -671,9 +676,6 @@ public class RegularTable extends TableBase {
}
scanIndex.remove(session);
database.removeMeta(session, getId());
if (containsLargeObject) {
database.getLobStorage().removeAllForTable(getId());
}
scanIndex = null;
lockExclusive = null;
lockShared = null;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论