mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 21:23:03 +01:00
Backport changes from HEAD necessary for CORE-1658
This commit is contained in:
parent
4d18b2ec67
commit
056f0ff422
@ -230,6 +230,27 @@ namespace {
|
||||
#define TEXT SCHAR
|
||||
#endif // WIN_NT
|
||||
|
||||
|
||||
Jrd::Database::~Database()
|
||||
{
|
||||
delete dbb_sys_trans;
|
||||
destroyIntlObjects();
|
||||
|
||||
pool_ptr* itr = dbb_pools.begin();
|
||||
while (itr != dbb_pools.end())
|
||||
{
|
||||
if (*itr && *itr == dbb_bufferpool)
|
||||
dbb_bufferpool = 0;
|
||||
if (*itr && *itr != dbb_permanent)
|
||||
itr = JrdMemoryPool::deletePool(*itr);
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
if (dbb_bufferpool)
|
||||
JrdMemoryPool::deletePool(dbb_bufferpool);
|
||||
}
|
||||
|
||||
|
||||
void Jrd::Trigger::compile(thread_db* tdbb)
|
||||
{
|
||||
if (!request /*&& !compile_in_progress*/)
|
||||
|
@ -334,23 +334,7 @@ private:
|
||||
dbb_pools.resize(1);
|
||||
}
|
||||
|
||||
~Database()
|
||||
{
|
||||
destroyIntlObjects();
|
||||
|
||||
pool_ptr* itr = dbb_pools.begin();
|
||||
while (itr != dbb_pools.end())
|
||||
{
|
||||
if (*itr && *itr == dbb_bufferpool)
|
||||
dbb_bufferpool = 0;
|
||||
if (*itr && *itr != dbb_permanent)
|
||||
itr = JrdMemoryPool::deletePool(*itr);
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
if (dbb_bufferpool)
|
||||
JrdMemoryPool::deletePool(dbb_bufferpool);
|
||||
}
|
||||
~Database();
|
||||
|
||||
// temporal measure to avoid unstable state of lock file -
|
||||
// this is anyway called in ~Database(), and in theory should be private
|
||||
|
@ -1044,6 +1044,7 @@ void TRA_release_transaction(thread_db* tdbb, jrd_tra* transaction)
|
||||
*
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
|
||||
if (transaction->tra_blobs.getFirst())
|
||||
while (true)
|
||||
@ -1152,11 +1153,7 @@ void TRA_release_transaction(thread_db* tdbb, jrd_tra* transaction)
|
||||
|
||||
delete transaction->tra_db_snapshot;
|
||||
|
||||
// Release the transaction pool.
|
||||
|
||||
JrdMemoryPool* tra_pool = transaction->tra_pool;
|
||||
if (tra_pool)
|
||||
JrdMemoryPool::deletePool(tra_pool);
|
||||
jrd_tra::destroy(dbb, transaction);
|
||||
}
|
||||
|
||||
|
||||
|
@ -111,6 +111,18 @@ public:
|
||||
delete tra_blob_space;
|
||||
}
|
||||
|
||||
static void destroy(Database* const dbb, jrd_tra* const transaction)
|
||||
{
|
||||
if (transaction)
|
||||
{
|
||||
JrdMemoryPool* const pool = transaction->tra_pool;
|
||||
delete transaction;
|
||||
|
||||
if (pool)
|
||||
JrdMemoryPool::deletePool(pool);
|
||||
}
|
||||
}
|
||||
|
||||
Attachment* tra_attachment; /* database attachment */
|
||||
SLONG tra_number; /* transaction number */
|
||||
SLONG tra_top; /* highest transaction in snapshot */
|
||||
|
Loading…
Reference in New Issue
Block a user