You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throwstd::runtime_error("BDB builtin encryption is not supported");
562
562
}
563
563
564
+
// Check all Log Sequence Numbers (LSN) point to file 0 and offset 1 which indicates that the LSNs were
565
+
// reset and that the log files are not necessary to get all of the data in the database.
566
+
for (uint32_t i = 0; i < outer_meta.last_page; ++i) {
567
+
// The LSN is composed of 2 32-bit ints, the first is a file id, the second an offset
568
+
// It will always be the first 8 bytes of a page, so we deserialize it directly for every page
569
+
uint32_t file;
570
+
uint32_t offset;
571
+
SeekToPage(db_file, i, page_size);
572
+
db_file >> file >> offset;
573
+
if (outer_meta.other_endian) {
574
+
file = internal_bswap_32(file);
575
+
offset = internal_bswap_32(offset);
576
+
}
577
+
if (file != 0 || offset != 1) {
578
+
throwstd::runtime_error("LSNs are not reset, this database is not completely flushed. Please reopen then close the database with a version that has BDB support");
0 commit comments