bolt
bolt copied to clipboard
Meta2 make DBFile invalid
Write-Transactions update Meta1 on commit, and Meta2 only be updated at Backup (invoke tx.WriteTo);
So, please consider this case:
- Assume my DB's freelist is stored in Page34, and I backup it now; Then the page id of freelist in meta2 is 34 now;
- Then I do some write-transactions on the new DB file, obviously the Page34 maybe reallocated as a branch page or a leaf page;
- If meta1 is written to broken now, then meta2 is used, and the Page34 is regard as a freelist page again;
@qw4990 do you have some example code that triggers the breakage?