mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-30 22:44:21 +01:00
Closes #2047 the validation code was assuming that: - if the parent has overflow cells after inserting a divider cell - the exact divider we are validating MUST be in those overflow cells However, this is not necessarily the case. Imagine: - First divider gets inserted at index `n`. It is too large to fit, so it gets pushed to `parent.overflow_cells()`. Parent usable space does not decrease. - Second divider gets inserted at index `n+1`. It is smaller, so it still fits in usable space. Hence: Provide information to the validation function about whether the inserted cell overflowed, and use that to find the left pointer and assert accordingly. Reviewed-by: Pere Diaz Bou <pere-altea@homail.com> Closes #2050