mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
A few changed based on Adriano's suggestions.
This commit is contained in:
parent
92487ce28e
commit
71c41904fe
@ -45,6 +45,8 @@ using namespace Jrd;
|
||||
|
||||
DatabaseSnapshot* DatabaseSnapshot::create(thread_db* tdbb)
|
||||
{
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
jrd_tra* transaction = tdbb->tdbb_transaction;
|
||||
fb_assert(transaction);
|
||||
|
||||
@ -52,7 +54,7 @@ DatabaseSnapshot* DatabaseSnapshot::create(thread_db* tdbb)
|
||||
{
|
||||
MemoryPool& pool = *transaction->tra_pool;
|
||||
transaction->tra_db_snapshot =
|
||||
FB_NEW(pool) DatabaseSnapshot(pool, transaction);
|
||||
FB_NEW(pool) DatabaseSnapshot(tdbb, pool, transaction);
|
||||
}
|
||||
|
||||
return transaction->tra_db_snapshot;
|
||||
@ -77,10 +79,9 @@ RecordBuffer* DatabaseSnapshot::allocBuffer(thread_db* tdbb,
|
||||
}
|
||||
|
||||
|
||||
DatabaseSnapshot::DatabaseSnapshot(MemoryPool& pool, jrd_tra* tran)
|
||||
DatabaseSnapshot::DatabaseSnapshot(thread_db* tdbb, MemoryPool& pool, jrd_tra* tran)
|
||||
: transaction(tran), snapshot(pool)
|
||||
{
|
||||
thread_db* tdbb = JRD_get_thread_data();
|
||||
Database* dbb = tdbb->tdbb_database;
|
||||
|
||||
// Database information
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
static DatabaseSnapshot* create(thread_db*);
|
||||
|
||||
protected:
|
||||
DatabaseSnapshot(MemoryPool&, jrd_tra*);
|
||||
DatabaseSnapshot(thread_db*, MemoryPool&, jrd_tra*);
|
||||
|
||||
private:
|
||||
jrd_tra* transaction;
|
||||
|
Loading…
Reference in New Issue
Block a user