• Sergey Petrunya's avatar
    MDEV-4687: impossible where with < operation, but =-5 return one row · 9a780a59
    Sergey Petrunya authored
    - Let _ma_record_pos() set SEARCH_PART_KEY when doing a search on
      a prefix of a [unique] key.  Otherwise, _ma_search_pos() would 
      find the first key equal to search key, and assume it is also 
      the last one, which will make a wrong estimate of key's position.
    
      A wrong key position may cause min_pos > max_pos and records_in_range()
      will return 0, which will make the optimizer think it's an impossible 
      range while in fact it is not.
    9a780a59
ma_range.c 10.1 KB