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:
Pere Diaz Bou 2025-03-12 17:24:59 +01:00
parent 2fd790a055
commit aa4703c442

View file

@ -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)?;