From 8666675fa95229f1e77c0adc24b5b2f03bd0de6e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 08:32:41 +0100 Subject: BUG#23171: Illegal group log position Tail fixes after re-applying patches to older version of clone. sql/log_event.cc: Name change of shall_skip() -> do_shall_skip() Introducing public shall_skip(). Name change of skip reason enumeration constants. Removing extreneous argument to slave_print_msg() causing compiler warning. sql/log_event.h: Adding enumeration for skip reason. Factoring out exec_event() into exec_relay_log_event(). Making public interface to event execution primitives. Adding documentation. Making some (internal) functions const-correct. sql/rpl_rli.cc: replicate_same_server_id is now a member variable of RLI. sql/rpl_rli.h: replicate_same_server_id is now a member variable of RLI. sql/slave.cc: Using RLI-specific member variable replicate_same_server_id instead of global instance. Moving comments about skipping logic to exec_relay_log_event(). Moving event execution logic to exec_relay_log_event(). sql/sql_binlog.cc: Using apply_event() directly and adding comment with explenation. --- sql/sql_binlog.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sql/sql_binlog.cc') diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index 23ca5330053..27418c9f9fc 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -150,9 +150,17 @@ void mysql_client_binlog_statement(THD* thd) DBUG_PRINT("info", ("bytes_decoded=%d; bufptr=0x%lx; buf[EVENT_LEN_OFFSET]=%u", bytes_decoded, bufptr, uint4korr(bufptr+EVENT_LEN_OFFSET))); ev->thd= thd; - if (int err= ev->exec_event(thd->rli_fake)) + /* + We go directly to the application phase, since we don't need + to check if the event shall be skipped or not. + + Neither do we have to update the log positions, since that is + not used at all: the rli_fake instance is used only for error + reporting. + */ + if (int err= ev->apply_event(thd->rli_fake)) { - DBUG_PRINT("info", ("exec_event() - error=%d", error)); + DBUG_PRINT("info", ("apply_event() - error=%d", error)); /* TODO: Maybe a better error message since the BINLOG statement now contains several events. -- cgit v1.2.1