mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Fix read frame setting wrong offset
When I added frame reading support I thought, okay, who cares about the page id of this page it we read it from a frame because we don't need it to compute the offset to read from the file in this case. Fuck me, because it was needed in case we read `page 1` from WAL because it has a differnt `offset`.
This commit is contained in:
parent
2fd790a055
commit
aa4703c442
1 changed files with 1 additions and 1 deletions
|
@ -1308,7 +1308,7 @@ pub fn begin_read_wal_frame(
|
|||
let frame = page.clone();
|
||||
let complete = Box::new(move |buf: Arc<RefCell<Buffer>>| {
|
||||
let frame = frame.clone();
|
||||
finish_read_page(2, buf, frame).unwrap();
|
||||
finish_read_page(page.get().id, buf, frame).unwrap();
|
||||
});
|
||||
let c = Completion::Read(ReadCompletion::new(buf, complete));
|
||||
io.pread(offset, c)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue