Skip to content

Commit 22260a0

Browse files
committed
Fixed drop of attachment-level GTT (reported in devel by Pavel and Adriano)
1 parent 6c797c7 commit 22260a0

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/dsql/DdlNodes.epp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14785,7 +14785,10 @@ void DropIndexNode::step2(thread_db* tdbb, jrd_tra* transaction)
1478514785
fb_assert(idxId >= 0 && idxId < dbb->dbb_max_idx);
1478614786

1478714787
if (IDX_mark_index(tdbb, indexRelation, idxId))
14788-
indexRelation->eraseIndex(tdbb, idxId);
14788+
{
14789+
if (tdbb->tdbb_flags & TDBB_use_db_page_space)
14790+
indexRelation->eraseIndex(tdbb, idxId);
14791+
}
1478914792
}
1479014793

1479114794

src/jrd/Database.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,6 @@ namespace Jrd
983983
return std::greater{}(item.relation, relation);
984984
},
985985
pos);
986-
fb_assert(found);
987986

988987
if (found)
989988
dbb_del_pages.remove(pos);

src/jrd/btr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,8 @@ void BTR_mark_index_for_delete(thread_db* tdbb, RelationPermanent* rel, MetaId i
11861186

11871187
Cleanup releaseWindow([&] ()
11881188
{
1189-
CCH_RELEASE(tdbb, window);
1189+
if (window->win_bdb)
1190+
CCH_RELEASE(tdbb, window);
11901191
});
11911192

11921193
// Get index descriptor. If index doesn't exist, just leave.

0 commit comments

Comments
 (0)