8
0
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:
dimitr 2006-07-18 06:00:52 +00:00
parent 92487ce28e
commit 71c41904fe
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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;