• Monty's avatar
    Fixes for 'Filtering' · 66d9c1b2
    Monty authored
    - table_after_join_selectivity() should use records_init (new bug)
    - get_examined_rows() changed to double to get similar results
      as in MariaDB 10.11
    - Fixed bug where table_after_join_selectivity() did not correct
      selectivity in the case where a RANGE is used instead of a REF.
      This can happen if the range can use more key_parts than the REF.
      WHERE key_part1=10 and key_part2 < 10
    
    Other things:
    - Use JT_RANGE instead of JT_ALL for RANGE access in all parts of the code.
      Before we used JT_ALL for RANGE.
    - Force RANGE be used in best_access_path() if the range used more key
      parts than ref. In the original code, this was done much later in
      make_join_select)(). However we need to know in
      table_after_join_selectivity() if we have used RANGE or not.
    - Added more information about filtering to optimizer_trace.
    66d9c1b2
sql_update.cc 98.2 KB