From 262c630c166b82e07042cd9ed0a194d1871d04a6 Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Thu, 17 Apr 2025 18:22:10 +0200 Subject: [PATCH] fix validation with overflow cells --- core/storage/btree.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/storage/btree.rs b/core/storage/btree.rs index df3e2ae3f..b1a8a8d26 100644 --- a/core/storage/btree.rs +++ b/core/storage/btree.rs @@ -2782,6 +2782,10 @@ impl BTreeCursor { } } if was_overflow { + if !leaf_data { + // remember to increase cell if this cell was moved to parent + current_index_cell += 1; + } continue; } // check if overflow @@ -2885,6 +2889,10 @@ impl BTreeCursor { } } if was_overflow { + if !leaf_data { + // remember to increase cell if this cell was moved to parent + current_index_cell += 1; + } continue; } let (parent_cell_start, parent_cell_len) = parent_contents.cell_get_raw_region(