List:Commits« Previous MessageNext Message »
From:<gshchepa Date:August 20 2007 12:02pm
Subject:bk commit into 5.0 tree (gshchepa:1.2498) BUG#30201
View as plain text  
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-20 17:02:24+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. 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 mysql_parse function has been modified to abort query
  cache in the case of query execution failure instead of
  the query_cache_end_of_result function call.
  

  sql/sql_parse.cc@stripped, 2007-08-20 17:02:03+05:00, gshchepa@stripped +5 -2
    Fixed bug #30201.
    The mysql_parse function has been modified to abort query
    cache in the case of query execution failure.

diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc	2007-08-05 08:53:13 +05:00
+++ b/sql/sql_parse.cc	2007-08-20 17:02:03 +05:00
@@ -6089,8 +6089,11 @@ 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_abort(&thd->net);
+          else
+            query_cache_end_of_result(thd);
+
 	}
       }
     }
Thread
bk commit into 5.0 tree (gshchepa:1.2498) BUG#30201gshchepa20 Aug