• gshchepa/uchum@gleb.loc's avatar
    Fixed bug #28598. · e16953df
    gshchepa/uchum@gleb.loc authored
    mysqld crashed when a long-running explain query was killed from
    another connection.
    
    When the current thread caught a kill signal executing the function
    best_extension_by_limited_search it just silently returned to  
    the calling function greedy_search without initializing elements of
    the join->best_positions array.
    However, the greedy_search function ignored thd->killed status
    after a calls to the best_extension_by_limited_search function, and
    after several calls the greedy_search function used an uninitialized
    data from the join->best_positions[idx] to search position in the
    join->best_ref array. 
    That search failed, and greedy_search tried to call swap_variables
    function with NULL argument - that caused a crash.
    e16953df
kill.test 5.76 KB