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.
Showing
Please register or sign in to comment