• Monty's avatar
    Adding option to tell that cmp_ref handler call is expensive · 04ef45cb
    Monty authored
    - In Spider, calling cmp_ref() can be very expensive. In ha_partition.cc
      we don't anymore sort rows according to position for the Spider
      engine.
    - Removed Spider specific call info(HA_EXTRA_STARTING_ORDERED_INDEX_SCAN)
      from handle_ordered_index_scan(). It's caused performance issues and
      does not change results for queries with ORDER BY.
    - The visible effect of this patch is that for some storage engines,
      rows may be returned in a different order if there is no ORDER BY clause.
    
    - Based in Spiral Patch 052:
      052_mariadb-10.2.0.add_partition_skip_pk_sort_for_non_clustered_index.diff
      MDEV-7748
    - The major difference from original patch is that there is no variable to
      get the old behaviour.
    
    - Other things:
      - Optimized ha_partition::cmp_ref() and cmp_part_ids() to make them
        simpler and faster.
      - Changed arguments to cmp_key_part_id() to be same as cmp_key_rowid_part_id
        to simplify code.
    
    Original author: Kentoku SHIBA
    First reviewer:  Jacob Mathew
    Second reviewer: Michael Widenius
    04ef45cb
handler.h 160 KB