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

Function page_validation_error

src/jrd/cch.cpp:4356–4388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4354
4355
4356static void page_validation_error(thread_db* tdbb, WIN* window, SSHORT type)
4357{
4358/**************************************
4359 *
4360 * p a g e _ v a l i d a t i o n _ e r r o r
4361 *
4362 **************************************
4363 *
4364 * Functional description
4365 * We've detected a validation error on fetch. Generally
4366 * we've detected that the type of page fetched didn't match the
4367 * type of page we were expecting. Report an error and
4368 * get out.
4369 * This function will only be called rarely, as a page validation
4370 * error is an indication of on-disk database corruption.
4371 *
4372 **************************************/
4373 SET_TDBB(tdbb);
4374 BufferDesc* bdb = window->win_bdb;
4375 const pag* page = bdb->bdb_buffer;
4376
4377 PageSpace* pages =
4378 tdbb->getDatabase()->dbb_page_manager.findPageSpace(bdb->bdb_page.getPageSpaceID());
4379
4380 ERR_build_status(tdbb->tdbb_status_vector,
4381 Arg::Gds(isc_db_corrupt) << Arg::Str(pages->file->fil_string) <<
4382 Arg::Gds(isc_page_type_err) <<
4383 Arg::Gds(isc_badpagtyp) << Arg::Num(bdb->bdb_page.getPageNum()) <<
4384 pagtype(type) <<
4385 pagtype(page->pag_type));
4386 // We should invalidate this bad buffer.
4387 CCH_unwind(tdbb, true);
4388}
4389
4390
4391#ifdef CACHE_READER

Callers 2

CCH_fetchFunction · 0.85
CCH_handoffFunction · 0.85

Calls 11

SET_TDBBFunction · 0.85
ERR_build_statusFunction · 0.85
GdsClass · 0.85
StrClass · 0.85
NumClass · 0.85
pagtypeFunction · 0.85
CCH_unwindFunction · 0.85
findPageSpaceMethod · 0.80
getDatabaseMethod · 0.80
getPageSpaceIDMethod · 0.80
getPageNumMethod · 0.80

Tested by

no test coverage detected