Skip to content

Commit

Permalink
Backport fix for bug CORE-2241 : Wrong number of records fetched when…
Browse files Browse the repository at this point in the history
… using index
  • Loading branch information
hvlad committed Jan 4, 2009
1 parent 307a3cf commit af63b42
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/jrd/btr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2841,7 +2841,7 @@ static USHORT compress_root(thread_db* tdbb, index_root_page* page)
#endif
);
memcpy(temp, page, dbb->dbb_page_size);
UCHAR* p = temp + dbb->dbb_page_size;
UCHAR* p = (UCHAR*) page + dbb->dbb_page_size;

index_root_page::irt_repeat* root_idx = page->irt_rpt;
for (const index_root_page::irt_repeat* const end = root_idx + page->irt_count;
Expand All @@ -2855,14 +2855,13 @@ static USHORT compress_root(thread_db* tdbb, index_root_page* page)
len = root_idx->irt_keys * sizeof(irtd);

p -= len;
memcpy(p, (SCHAR*)page + root_idx->irt_desc, len);
root_idx->irt_desc = p - temp;
memcpy(p, temp + root_idx->irt_desc, len);
root_idx->irt_desc = p - (UCHAR*) page;
}
}
const USHORT l = p - temp;
tdbb->getDefaultPool()->deallocate(temp);

return l;
return p - (UCHAR*) page;
}


Expand Down

0 comments on commit af63b42

Please sign in to comment.