• gshchepa/uchum@gleb.loc's avatar
    Fixed bug #30201. · f3d0f62d
    gshchepa/uchum@gleb.loc authored
    Killing a SELECT query with KILL QUERY or KILL CONNECTION
    causes a server crash if the query cache is enabled.
    
    Normal evaluation of a query may be interrupted by the
    KILL QUERY/CONNECTION statement, in this case the mysql_execute_command
    function returns TRUE, and the thd->killed flag has true value.
    In this case the result of the query may
    be cached incompletely (omitting call to query_cache_insert inside
    the net_real_write function), and next call to query_cache_end_of_result
    may lead to server crash.
    Thus, the query_cache_end_of_result function has been modified to abort
    query cache in the case of killed thread.
    f3d0f62d
sql_cache.cc 129 KB