8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:03:04 +01:00

Release GTT's pages while dropping it

It prevents a temp file from growing in cases when several GTTs are created, filled with data, and dropped.
This commit is contained in:
Ilya Eremin 2021-08-30 12:32:08 +03:00
parent bcc2b6a833
commit da7e5599d0

View File

@ -4915,6 +4915,13 @@ static bool delete_relation(thread_db* tdbb, SSHORT phase, DeferredWork* work, j
EXT_fini(relation, false);
}
if (relation->isTemporary())
{
// release pages, allocated for current GTT instance
AutoSetRestoreFlag<ULONG> tmpSpace(&tdbb->tdbb_flags, TDBB_use_db_page_space, false);
relation->delPages(tdbb);
}
RelationPages* const relPages = relation->getBasePages();
if (relPages->rel_index_root) {
IDX_delete_indices(tdbb, relation, relPages);