• Sergei Petrunia's avatar
    MDEV-10228: Delete missing rows with OR conditions · 15ef38d2
    Sergei Petrunia authored
    Fix get_quick_keys(): When building range tree from a condition
    in form
    
      keypart1=const AND (keypart2 < 0 OR keypart2>=0)
    
    the SEL_ARG for keypart2 represents an interval (-inf, +inf).
    However, the logic that sets UNIQUE_RANGE flag fails to recognize
    this, and sets UNIQUE_RANGE flag if (keypart1, keypart2) covered
    a unique key.
    As a result, range access executor assumes the interval can have
    at most one row and only reads the first row from it.
    15ef38d2
range.test 59.9 KB