Skip to content

Commit

Permalink
Go to previous cell, since seek advances the stack by one. This corre…
Browse files Browse the repository at this point in the history
…ntly deletes the cell we want
  • Loading branch information
krishvishal committed Jan 14, 2025
1 parent 80b93cb commit b825a26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/storage/btree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,10 @@ impl Cursor for BTreeCursor {
return_if_locked!(page);

let mut cell_idx = self.stack.current_cell_index() as usize;

// FIXME: This is HACK, seek() is returning next cell, so we need to go back one cell.
cell_idx -= 1;

let contents = page.get().contents.as_ref().unwrap();

println!("cell_idx: {}", cell_idx);
Expand Down

0 comments on commit b825a26

Please sign in to comment.