List:Commits« Previous MessageNext Message »
From:holyfoot Date:June 26 2007 4:53pm
Subject:bk commit into 5.1 tree (holyfoot:1.2514) BUG#29156
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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-06-26 19:53:45+05:00, holyfoot@stripped +1 -0
  Bug #29156 events crash server in test suite
  
  don't free thd->lex->sphead if we didn't do lex_start(),
  as we can have garbage there

  sql/event_data_objects.cc@stripped, 2007-06-26 19:53:42+05:00, holyfoot@stripped +10 -8
    Bug #29156 events crash server in test suite
    
    don't free thd->lex->sphead if we didn't do lex_start(),
    as we can have garbage there

diff -Nrup a/sql/event_data_objects.cc b/sql/event_data_objects.cc
--- a/sql/event_data_objects.cc	2007-06-15 13:40:28 +05:00
+++ b/sql/event_data_objects.cc	2007-06-26 19:53:42 +05:00
@@ -1778,7 +1778,7 @@ Event_job_data::execute(THD *thd, bool d
                     "[%s].[%s.%s] execution failed, "
                     "failed to authenticate the user.",
                     definer.str, dbname.str, name.str);
-    goto end;
+    goto end_no_lex_start;
   }
 #endif
 
@@ -1795,11 +1795,11 @@ Event_job_data::execute(THD *thd, bool d
                     "[%s].[%s.%s] execution failed, "
                     "user no longer has EVENT privilege.",
                     definer.str, dbname.str, name.str);
-    goto end;
+    goto end_no_lex_start;
   }
 
   if (construct_sp_sql(thd, &sp_sql))
-    goto end;
+    goto end_no_lex_start;
 
   /*
     Set up global thread attributes to reflect the properties of
@@ -1860,6 +1860,13 @@ Event_job_data::execute(THD *thd, bool d
   }
 
 end:
+  if (thd->lex->sphead)                        /* NULL only if a parse error */
+  {
+    delete thd->lex->sphead;
+    thd->lex->sphead= NULL;
+  }
+
+end_no_lex_start:
   if (drop && !thd->is_fatal_error)
   {
     /*
@@ -1886,11 +1893,6 @@ end:
       if (Events::drop_event(thd, dbname, name, FALSE))
         ret= 1;
     }
-  }
-  if (thd->lex->sphead)                        /* NULL only if a parse error */
-  {
-    delete thd->lex->sphead;
-    thd->lex->sphead= NULL;
   }
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   if (save_sctx)
Thread
bk commit into 5.1 tree (holyfoot:1.2514) BUG#29156holyfoot26 Jun