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

Method getKnownPage

src/jrd/Database.cpp:521–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519 }
520
521 ULONG Database::getKnownPage(SCHAR ptype, ULONG sequence)
522 {
523 fb_assert(ptype == pag_transactions || ptype == pag_ids);
524
525 SyncLockGuard guard(&dbb_pages_sync, SYNC_SHARED, FB_FUNCTION);
526
527 const auto vector =
528 (ptype == pag_transactions) ? dbb_tip_pages :
529 (ptype == pag_ids) ? dbb_gen_pages :
530 nullptr;
531
532 if (!vector || sequence >= vector->count())
533 return 0;
534
535 return (*vector)[sequence];
536 }
537
538 void Database::setKnownPage(SCHAR ptype, ULONG sequence, ULONG value)
539 {

Callers 3

walk_generatorsMethod · 0.80
walk_tipMethod · 0.80
inventory_pageFunction · 0.80

Calls 1

countMethod · 0.45

Tested by

no test coverage detected