• Georgi Kodinov's avatar
    Bug #49324: more valgrind errors in test_if_skip_sort_order · f11861c2
    Georgi Kodinov authored
    Fixed 2 problems :
    1. test_if_order_by_key() was continuing on the primary key
    as if it has a primary key suffix (as the secondary keys do).
    This leads to crashes in ORDER BY <pk>,<pk>.
    Fixed by not treating the primary key as the secondary one
    and not depending on it being clustered with a primary key.
    2. The cost calculation was trying to read the records 
    per key when operating on ORDER BYs that order on all of the 
    secondary key + some of the primary key.
    This leads to crashes because of out-of-bounds array access.
    Fixed by assuming we'll find 1 record per key in such cases.
    f11861c2
sql_select.cc 540 KB