diff --git a/mysql-test/r/rpl_incident.result b/mysql-test/r/rpl_incident.result index 5becaf37068..70086c1e848 100644 --- a/mysql-test/r/rpl_incident.result +++ b/mysql-test/r/rpl_incident.result @@ -47,7 +47,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1583 +Last_Errno 1586 Last_Error The incident LOST_EVENTS occured on the master. Message: Skip_Counter 0 Exec_Master_Log_Pos # diff --git a/sql/log_event.cc b/sql/log_event.cc index 661eafd976f..e3c94b5e1c9 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -7956,9 +7956,9 @@ Incident_log_event::print(FILE *file, #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) int -Incident_log_event::exec_event(st_relay_log_info *rli) +Incident_log_event::do_apply_event(RELAY_LOG_INFO const *rli) { - DBUG_ENTER("Incident_log_event::exec_event"); + DBUG_ENTER("Incident_log_event::do_apply_event"); slave_print_msg(ERROR_LEVEL, rli, ER_SLAVE_INCIDENT, ER(ER_SLAVE_INCIDENT), description(), diff --git a/sql/log_event.h b/sql/log_event.h index 500f3533c92..51543291621 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -2588,7 +2588,7 @@ public: #endif #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) - virtual int exec_event(struct st_relay_log_info *rli); + virtual int do_apply_event(RELAY_LOG_INFO const *rli); #endif virtual bool write_data_header(IO_CACHE *file); diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 16e13f049e3..b0db355154e 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -969,7 +969,7 @@ err: strtol() conversions needed for log names comparison. We don't need to compare them each time this function is called, we only need to do this when current log name changes. If we have UNTIL_MASTER_POS condition we - need to do this only after Rotate_log_event::exec_event() (which is + need to do this only after Rotate_log_event::do_apply_event() (which is rare, so caching gives real benifit), and if we have UNTIL_RELAY_POS condition then we should invalidate cached comarison value after inc_group_relay_log_pos() which called for each group of events (so we @@ -1093,12 +1093,12 @@ void st_relay_log_info::cleanup_context(THD *thd, bool error) DBUG_ASSERT(sql_thd == thd); /* - 1) Instances of Table_map_log_event, if ::exec_event() was called on them, + 1) Instances of Table_map_log_event, if ::do_apply_event() was called on them, may have opened tables, which we cannot be sure have been closed (because maybe the Rows_log_event have not been found or will not be, because slave SQL thread is stopping, or relay log has a missing tail etc). So we close all thread's tables. And so the table mappings have to be cancelled. - 2) Rows_log_event::exec_event() may even have started statements or + 2) Rows_log_event::do_apply_event() may even have started statements or transactions on them, which we need to rollback in case of error. 3) If finding a Format_description_log_event after a BEGIN, we also need to rollback before continuing with the next events. diff --git a/sql/sql_class.h b/sql/sql_class.h index a9915fce4ef..dc282586c86 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1270,7 +1270,7 @@ public: return first_successful_insert_id_in_prev_stmt; } /* - Used by Intvar_log_event::exec_event() and by "SET INSERT_ID=#" + Used by Intvar_log_event::do_apply_event() and by "SET INSERT_ID=#" (mysqlbinlog). We'll soon add a variant which can take many intervals in argument. */