Skip to content

Commit

Permalink
Fixed bug CORE-2771 : AV at backup of database with GTT
Browse files Browse the repository at this point in the history
  • Loading branch information
hvlad committed Nov 25, 2009
1 parent 2f6d5fd commit 0379a58
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/jrd/Relation.cpp
Expand Up @@ -194,6 +194,11 @@ RelationPages* jrd_rel::getPagesInternal(thread_db* tdbb, SLONG tran, bool alloc
pool = dbb->createPool();
Jrd::ContextPoolHolder context(tdbb, pool);

jrd_tra *idx_tran = tdbb->getTransaction();
if (!idx_tran) {
idx_tran = dbb->dbb_sys_trans;
}

IndexDescAlloc* indices = NULL;
// read indices from "base" index root page
const USHORT idx_count = BTR_all(tdbb, this, &indices, &rel_pages_base);
Expand All @@ -206,8 +211,7 @@ RelationPages* jrd_rel::getPagesInternal(thread_db* tdbb, SLONG tran, bool alloc

idx->idx_root = 0;
SelectivityList selectivity(*pool);
IDX_create_index(tdbb, this, idx, idx_name.c_str(), NULL,
tdbb->getTransaction(), selectivity);
IDX_create_index(tdbb, this, idx, idx_name.c_str(), NULL, idx_tran, selectivity);

#ifdef VIO_DEBUG
if (debug_flag > DEBUG_WRITES)
Expand Down

0 comments on commit 0379a58

Please sign in to comment.