From: Date: August 2 2007 10:15pm Subject: bk commit into 5.0 tree (gshchepa:1.2497) BUG#30201 List-Archive: http://lists.mysql.com/commits/32027 X-Bug: 30201 Message-Id: <20070802201529.C31C03D43CA@localhost.localdomain> Below is the list of changes that have just been committed into a local 5.0 repository of uchum. When uchum does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-08-03 01:15:22+05:00, gshchepa@stripped +1 -0 Fixed bug #30201. Killing a SELECT query with KILL QUERY or KILL CONNECTION caused 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. However, result of this function was ignored, and the query_cache_end_of_result function was called with the incompletely initialized lex object value. That caused a crash. sql/sql_parse.cc@stripped, 2007-08-03 00:47:05+05:00, gshchepa@stripped +3 -3 Fixed bug #30201. The mysql_parse function has been modified to take into account the resulting values of the mysql_execute_command. diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc --- a/sql/sql_parse.cc 2007-07-30 20:27:30 +05:00 +++ b/sql/sql_parse.cc 2007-08-03 00:47:05 +05:00 @@ -6083,12 +6083,12 @@ void mysql_parse(THD *thd, const char *i thd->query_length--; /* Actually execute the query */ lex->set_trg_event_type_for_tables(); - mysql_execute_command(thd); - query_cache_end_of_result(thd); + if (!mysql_execute_command(thd)) + query_cache_end_of_result(thd); } } } - else + if (err || thd->is_fatal_error) { DBUG_ASSERT(thd->net.report_error); DBUG_PRINT("info",("Command aborted. Fatal_error: %d",