MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / getOldDatabaseID

Function getOldDatabaseID

src/storage/shadow_file.cpp:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84static uuid getOldDatabaseID(FileInfo& dataFileInfo) {
85 auto oldHeader = DatabaseHeader::readDatabaseHeader(dataFileInfo);
86 if (!oldHeader.has_value()) {
87 throw InternalException("Found a shadow file for database {} but no valid database header. "
88 "The database is corrupted, please recreate it.");
89 }
90 return oldHeader->databaseID;
91}
92
93void ShadowFile::replayShadowPageRecords(ClientContext& context) {
94 if (context.getDBConfig()->readOnly) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected