Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Ensure portdb selects _all_ rows with negative rowids #13226

Merged
merged 2 commits into from
Jul 11, 2022

Commits on Jul 8, 2022

  1. 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.
    David Robertson committed Jul 8, 2022
    Configuration menu
    Copy the full SHA
    21e9fc5 View commit details
    Browse the repository at this point in the history
  2. Changelog

    David Robertson committed Jul 8, 2022
    Configuration menu
    Copy the full SHA
    d1decf6 View commit details
    Browse the repository at this point in the history