Btree: fix cursor record state not being updated in insert_into_page()

overwrite_cell() requires that the cursor state is pointing to a valid
record, but this was not currently set properly.
This commit is contained in:
Jussi Saurio 2025-05-28 16:45:40 +03:00
parent 7ab243dc4e
commit dad1e6293b

View file

@ -2153,6 +2153,7 @@ impl BTreeCursor {
) == Ordering::Equal {
tracing::debug!("insert_into_page: found exact match with cell_idx={cell_idx}, overwriting");
self.has_record.set(CursorHasRecord::Yes { rowid: self.get_index_rowid_from_record() });
self.overwrite_cell(page.clone(), cell_idx, record)?;
self.state
.mut_write_info()