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

Method checkHeader

src/lock/lock.cpp:4011–4029  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4009}
4010
4011bool LockManager::checkHeader(const MemoryHeader* header, bool raiseError)
4012{
4013 fb_assert(header);
4014
4015 if (raiseError &&
4016 header->mhb_type == getType() &&
4017 header->mhb_header_version == MemoryHeader::HEADER_VERSION &&
4018 header->mhb_version != getVersion() &&
4019 (header->mhb_version & ~PLATFORM_LHB_VERSION) == BASE_LHB_VERSION)
4020 {
4021 // @1-bit engine can't open database already opened by @2-bit engine
4022 if (LHB_VERSION == BASE_LHB_VERSION)
4023 (Arg::Gds(isc_wrong_shmem_bitness) << Arg::Num(32) << Arg::Num(64)).raise();
4024 else
4025 (Arg::Gds(isc_wrong_shmem_bitness) << Arg::Num(64) << Arg::Num(32)).raise();
4026 }
4027
4028 return IpcObject::checkHeader(header, raiseError);
4029};
4030
4031#ifdef USE_SHMEM_EXT
4032void LockManager::Extent::assign(const SharedMemoryBase& p)

Callers 2

initializeTpcMethod · 0.45
StatusBlockDataMethod · 0.45

Calls 5

getVersionFunction · 0.85
GdsClass · 0.85
NumClass · 0.85
getTypeFunction · 0.70
raiseMethod · 0.45

Tested by

no test coverage detected