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.
Third patch of the bug fix where the code for skipping events and for
executing events is factored out into three functions:
- shall_skip() to decide if the event shall be skipped and the
reason for it;
- do_apply_event(), where the event is applied to the database; and
- do_update_pos(), which updates the actual relay log position and
group positions.
mysql-test/r/rpl_row_tabledefs_2myisam.result:
Result change.
mysql-test/r/rpl_row_tabledefs_3innodb.result:
Result change.
sql/log_event.cc:
Creating shall_skip(), do_update_pos(), and do_apply_event()
functions for each event by factoring out the previous code.
Adding debug code and fixing some error codes that were not correct.
sql/rpl_rli.cc:
Renaming unsafe_to_stop_at into last_event_start_time.
Adding debug code.
sql/rpl_rli.h:
Renaming unsafe_to_stop_at into last_event_start_time.
sql/slave.cc:
Renaming unsafe_to_stop_at into last_event_start_time.
Second patch to fix skipping code. Moving relay and binary log
position changing code from do_apply_event [old exec_event()] into
do_update_pos() and doing other changes necessary to support that.
Fixing a bug that can cause deadlock if rotating binary log when committing
a changes to a transactional table that is not inside a transaction and
cause a rotate log.
sql/log.cc:
Changing condition in binlog_commit() to skip calling
binlog_end_trans() twice to match condition in binlog_end_trans().
sql/log_event.cc:
Name change: apply_event_impl() -> do_apply_event()
Name change: advance_coord_impl() -> do_update_pos()
do_apply_event() now uses pointer to constant RELAY_LOG_INFO to prevent
inadvertandly changing the position in the code. Doing this would make
the skipping code loose track of where it is. All position changing code
shall now be in do_update_pos().
Factoring out relay and binary log position updating code from
do_apply_event() [previously exec_event()] into do_update_pos().
Using a safe approach to make it work: will refine the refactoring
when the skipping code is implemented.
Adding const casts where needed.
Changing signature to use pointers to constant objects where needed.
sql/rpl_rli.cc:
Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO.
Debriding code.
sql/rpl_rli.h:
Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO.
Debriding code.
sql/rpl_utility.cc:
Using pointer to const RELAY_LOG_INFO to make it work with other code.
sql/rpl_utility.h:
Using pointer to const RELAY_LOG_INFO to make it work with other code.
sql/slave.cc:
Using pointer to const RELAY_LOG_INFO to make it work with other code.
Adding const cast where necessary.
sql/slave.h:
Using pointer to const RELAY_LOG_INFO to make it work with other code.
should be a separate module (i.e. a class) to make it easier to maintain the
code, e.g. by having checks within the rli checking sanity of data and making
member variables private. This will also ease implementation of multi-source
and, at least in my fantasies :), make it possible in some future to have
separate replication servers.
sql/Makefile.am:
Added file rpl_rli.cc
sql/repl_failsafe.cc:
Move function
sql/rpl_rli.h:
moved functions
sql/slave.cc:
Moved rli code into rpl_rli.cc
sql/sql_repl.cc:
Changed function to be member function
sql/rpl_rli.cc:
Code for rli