List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:August 26 2010 10:01am
Subject:bzr commit into mysql-5.5-runtime branch (jon.hauglid:3122) Bug#44171
View as plain text  
#At file:///export/home/x/mysql-5.5-runtime-bug44171/ based on revid:jon.hauglid@stripped

 3122 Jon Olav Hauglid	2010-08-26
      Bug #44171 KILL ALTER EVENT can crash the server
      
      This assert could be triggered if ALTER EVENT failed to load the
      event after altering it. Failing to load the event could for 
      example happen because of KILL QUERY.
      
      The assert tested that the result of a failed load_named_event()
      was OP_LOAD_ERROR. However since load_named_event() returns bool,
      this assert did not make any sense. This patch therefore removes
      the assert, fixing the problem. The patch also removes 
      enum_events_error_code since it was unused.
      
      No test case added. The bug fix is trivial and this bug was
      easily detected by RQG tests. Further, adding a MTR test case
      for this bug would require adding sync points to make the
      test case repeatable.

    modified:
      sql/events.cc
      sql/events.h
=== modified file 'sql/events.cc'
--- a/sql/events.cc	2010-08-18 11:29:04 +0000
+++ b/sql/events.cc	2010-08-26 10:01:43 +0000
@@ -485,10 +485,7 @@ Events::update_event(THD *thd, Event_par
       ret= TRUE;                                // OOM
     else if ((ret= db_repository->load_named_event(thd, dbname, name,
                                                    new_element)))
-    {
-      DBUG_ASSERT(ret == OP_LOAD_ERROR);
       delete new_element;
-    }
     else
     {
       /*

=== modified file 'sql/events.h'
--- a/sql/events.h	2010-08-05 12:34:19 +0000
+++ b/sql/events.h	2010-08-26 10:01:43 +0000
@@ -44,19 +44,6 @@ class THD;
 typedef class Item COND;
 typedef struct charset_info_st CHARSET_INFO;
 
-/* Return codes */
-enum enum_events_error_code
-{
-  OP_OK= 0,
-  OP_NOT_RUNNING,
-  OP_CANT_KILL,
-  OP_CANT_INIT,
-  OP_DISABLED_EVENT,
-  OP_LOAD_ERROR,
-  OP_ALREADY_EXISTS
-};
-
-
 int
 sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs);
 


Attachment: [text/bzr-bundle] bzr/jon.hauglid@oracle.com-20100826100143-hahbnr51em0lwv7e.bundle
Thread
bzr commit into mysql-5.5-runtime branch (jon.hauglid:3122) Bug#44171Jon Olav Hauglid26 Aug
  • Re: bzr commit into mysql-5.5-runtime branch (jon.hauglid:3122)Bug#44171Dmitry Lenev26 Aug