Fixed bug #30201.
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. sql/sql_cache.cc: Fixed bug #30201. The query_cache_end_of_result function has been modified to abort query cache in the case of query execution failure. Also this function has been modified to remove incomplete query block.
Showing
Please register or sign in to comment