Skip to content

Commit 3fa7269

Browse files
committed
Fix bugcheck in Savepoint.cpp after DLTT usage - thanks Pavel Zotov
1 parent 7b248dd commit 3fa7269

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/jrd/Savepoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ void Savepoint::cleanupTempData()
438438

439439
for (VerbAction* action = m_actions; action; action = action->vct_next)
440440
{
441-
if (action->vct_relation->getPermanent()->rel_flags & REL_temp_tran)
441+
if (action->vct_relation->getPermanent()->rel_flags & (REL_temp_tran | REL_temp_frame))
442442
{
443443
RecordBitmap::reset(action->vct_records);
444444

src/jrd/jrd.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8200,6 +8200,12 @@ bool JRD_shutdown_database(Database* dbb, const unsigned flags)
82008200
// Shut down any extern relations
82018201
dbb->dbb_mdc->releaseRelations(tdbb);
82028202

8203+
// Release cached metadata objects (procedures, functions, etc.) while
8204+
// the buffer manager and lock manager are still alive.
8205+
// This is needed because Statement::release may require page access
8206+
// (e.g. for LTT cleanup via IDX_delete_indices).
8207+
dbb->dbb_mdc->cleanup(tdbb);
8208+
82038209
LCK_fini(tdbb, LCK_OWNER_database);
82048210

82058211
CCH_fini(tdbb);
@@ -8221,8 +8227,6 @@ bool JRD_shutdown_database(Database* dbb, const unsigned flags)
82218227
}
82228228
}
82238229

8224-
dbb->dbb_mdc->cleanup(tdbb);
8225-
82268230
if (flags & SHUT_DBB_RELEASE_POOLS)
82278231
{
82288232
tdbb->setDatabase(NULL);

0 commit comments

Comments
 (0)