• Sergei Petrunia's avatar
    MDEV-9457: Poor query plan chosen for ORDER BY query by a recent 10.1 · ff8d4009
    Sergei Petrunia authored
    Undo the change in test_if_skip_sort_order() that set ref_key=-1 when
    a variant of index_merge is used (was made in fix for MDEV-9021).
    
    It turned out that test_if_cheaper_ordering() call below assumes that
    ref_key=-1 means "no index is used", that is, "an inefficient full table
    scan is done".
    This is not the same as index_merge, index_merge can actually be quite
    efficient. So, ref_key=MAX_KEY denotes the fact that some index is used,
    not any given index.
    ff8d4009
order_by_innodb.test 1.27 KB