mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 15:23:02 +01:00
Fixed "wrong page type" bugcheck.
This commit is contained in:
parent
5957ef655b
commit
f5bb311b4b
@ -613,11 +613,15 @@ double getRelationCardinality(thread_db* tdbb, jrd_rel* relation, const Format*
|
||||
window.win_page = (*vector)[0];
|
||||
Ods::pointer_page* ppage =
|
||||
(Ods::pointer_page*) CCH_FETCH(tdbb, &window, LCK_read, pag_pointer);
|
||||
SLONG record_count = 0;
|
||||
const SLONG* page = ppage->ppg_page;
|
||||
Ods::data_page* dpage =
|
||||
(Ods::data_page*) CCH_HANDOFF(tdbb, &window, *page, LCK_read, pag_data);
|
||||
if (*page) {
|
||||
Ods::data_page* dpage =
|
||||
(Ods::data_page*) CCH_HANDOFF(tdbb, &window, *page, LCK_read, pag_data);
|
||||
record_count = dpage->dpg_count;
|
||||
}
|
||||
CCH_RELEASE(tdbb, &window);
|
||||
return dpage->dpg_count;
|
||||
return record_count;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user