Fix non-4096 page sizes by making WAL header lazy

This commit is contained in:
Jussi Saurio
2025-08-12 21:08:49 +03:00
parent f8620a9869
commit c75e4c1092
7 changed files with 129 additions and 92 deletions

View File

@@ -474,12 +474,6 @@ impl DatabaseFile {
impl turso_core::DatabaseStorage for DatabaseFile {
fn read_header(&self, c: turso_core::Completion) -> turso_core::Result<turso_core::Completion> {
let r = c.as_read();
let size = r.buf().len();
assert!(
size == 100,
"the size of the database header must be 100 bytes, got {size}"
);
self.file.pread(0, c)
}
fn read_page(