This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure portdb selects rows with negative rowids
The `backward_select` query uses the `backward_chunk` variable as an inclusive upper bound on the rowids it selects. It is initially 0 (see `setup_table`). It is then set to ``` backward_chunk = min(row[0] for row in brows) - 1 ``` where `brows` is the result of running the `backwards_select` query. For this to make sense, we need to ensure that `backwards_select` picks rows in descending order. Otherwise we'll jump right to the bottom of the rowids, pick out the lowest batch only and discard everything we skipped over. This is a Bad Thing. I've tested this locally with the reproduction case reported in #13191. Without the patch, I could reproduce the reported failure; with the patch, the portdb script completes successfully.
- Loading branch information