From ab59263b2496ffa37a37068996aa342b87ca422a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Apr 2007 23:53:05 -0400 Subject: Fix rpl_events test failure in the runtime tree. mysql-test/r/rpl_events.result: Now ON COMPLETION NOT PRESERVE events are also dropped on the slave, since DROP EVENT command that is invoked for all such commands gets invoked on the slave. sql/event_data_objects.cc: Fix the failing rpl_events test after the patch for Bug#27733. At the time Events::drop_event got invoked inside Event_job_data::execute() thd->query pointed to CREATE PROCEDURE statement. This statement was written to the binary log from inside Events::drop_event (under assumption that this is a DROP EVENT statement that needs to be replicated), and caused creation of this procedure on the slave (and a subsequent failure when a procedure with the same name already exist). The patch ensures that thd->query points at the right query text for DROP EVENT executed when dropping ON COMPLETION NOT PRESERVE events. sql/event_data_objects.h: Update a declaration. sql/events.cc: Change if () to an assert: thd->query now always points at a valid query. --- sql/event_data_objects.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/event_data_objects.h') diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index 2c1dd14aa9e..8e03ab19602 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -184,6 +184,8 @@ public: private: bool construct_sp_sql(THD *thd, String *sp_sql); + bool + construct_drop_event_sql(THD *thd, String *sp_sql); Event_job_data(const Event_job_data &); /* Prevent use of these */ void operator=(Event_job_data &); -- cgit v1.2.1