vinyl: fix error with return out of range stmts from read_iter
When the read iterator gets next range, it then calls read_iterator_merge_next_key. But this function can call read_iterator_restore, that causes also restore of the range_iterator. This restore returns the previous range, and the next statements are out of the range. Example: curr_range curr_stmt next_stmt +-------------+--------------+ | -inf x +inf | +-------------+--------------+ read_iterator_next_range curr_stmt curr_range next_stmt +-------------+--------------+ | -inf x +inf | +-------------+--------------+ read_iterator_merge_next_keys fails version checking and call read_iterator_restore, which calls range_iterator_restore to the curr_stmt. And then the merge_iterator returns the next_stmt, which is out of the curr_range. curr_range curr_stmt +-------------+--------------+ | -inf x +inf | +-------------+--------------+
Loading
Please register or sign in to comment