MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / setPage

Method setPage

src/jrd/recsrc/IndexTableScan.cpp:677–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675}
676
677void IndexTableScan::setPage(thread_db* tdbb, Impure* impure, win* window) const
678{
679 const ULONG newPage = window ? window->win_page.getPageNum() : 0;
680
681 if (impure->irsb_nav_page != newPage)
682 {
683 if (impure->irsb_nav_page)
684 {
685 fb_assert(impure->irsb_nav_btr_gc_lock);
686 impure->irsb_nav_btr_gc_lock->enablePageGC(tdbb);
687 }
688
689 if (newPage)
690 {
691 if (!impure->irsb_nav_btr_gc_lock)
692 {
693 impure->irsb_nav_btr_gc_lock =
694#ifdef DEBUG_LCK_LIST
695 FB_NEW_RPT(*tdbb->getDefaultPool(), 0) BtrPageGCLock(tdbb, tdbb->getDefaultPool());
696#else
697 FB_NEW_RPT(*tdbb->getDefaultPool(), 0) BtrPageGCLock(tdbb);
698#endif
699 }
700
701 impure->irsb_nav_btr_gc_lock->disablePageGC(tdbb, window->win_page);
702 }
703
704 impure->irsb_nav_page = newPage;
705
706 // clear position as page was changed
707 impure->irsb_nav_incarnation = 0;
708 impure->irsb_nav_offset = 0;
709 }
710}
711
712void IndexTableScan::setPosition(thread_db* tdbb,
713 Impure* impure,

Callers

nothing calls this directly

Calls 5

getPageNumMethod · 0.80
enablePageGCMethod · 0.80
disablePageGCMethod · 0.80
BtrPageGCLockClass · 0.70
getDefaultPoolMethod · 0.45

Tested by

no test coverage detected