Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed bug CORE-3188 : page 0 is of wrong type (expected 6, found 1)
  • Loading branch information
hvlad committed Oct 17, 2010
1 parent 98bf701 commit 9ddc0ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jrd/idx.cpp
Expand Up @@ -602,8 +602,7 @@ void IDX_delete_index(thread_db* tdbb, jrd_rel* relation, USHORT id)

signal_index_deletion(tdbb, relation, id);

RelationPages* relPages = relation->getPages(tdbb);
WIN window(relPages->rel_pg_space_id, relPages->rel_index_root);
WIN window(get_root_page(tdbb, relation));
CCH_FETCH(tdbb, &window, LCK_write, pag_root);

const bool tree_exists = BTR_delete_index(tdbb, &window, id);
Expand Down Expand Up @@ -636,6 +635,8 @@ void IDX_delete_indices(thread_db* tdbb, jrd_rel* relation, RelationPages* relPa
*
**************************************/
SET_TDBB(tdbb);

fb_assert(relPages->rel_index_root);

WIN window(relPages->rel_pg_space_id, relPages->rel_index_root);
index_root_page* root = (index_root_page*) CCH_FETCH(tdbb, &window, LCK_write, pag_root);
Expand Down Expand Up @@ -733,8 +734,7 @@ void IDX_garbage_collect(thread_db* tdbb,
insertion.iib_relation = rpb->rpb_relation;
insertion.iib_key = &key1;

RelationPages* relPages = rpb->rpb_relation->getPages(tdbb);
WIN window(relPages->rel_pg_space_id, relPages->rel_index_root);
WIN window(get_root_page(tdbb, rpb->rpb_relation));

index_root_page* root = (index_root_page*) CCH_FETCH(tdbb, &window, LCK_read, pag_root);

Expand Down

0 comments on commit 9ddc0ef

Please sign in to comment.