• Sergei Petrunia's avatar
    MDEV-22401: Optimizer trace: multi-component range is not printed correctly · 7bc67357
    Sergei Petrunia authored
    KEY_MULTI_RANGE::range_flag does not have correct flag bits for
    per-endpoint flags (NEAR_MIN, NEAR_MAX, NO_MIN_RANGE, NO_MAX_RANGE).
    It only has bits for flags that describe both endpoints.
    So
    - Document this.
    - Switch optimizer trace to using {start|end}_key.flag values, instead.
      This fixes the bug.
    - Switch records_in_column_ranges() to doing that too. (This used to
      work, because KEY_MULTI_RANGE::range_flag had correct flag value
      for the last key component, and EITS only uses one-component
      pseudo-indexes)
    7bc67357
opt_range.cc 516 KB