Refactoring: Moved rli code to new file rpl_rli.cc. The idea being that rli

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
This commit is contained in:
unknown 2006-10-31 12:23:14 +01:00
commit 69d92fb189
6 changed files with 1207 additions and 1161 deletions

View file

@ -21,6 +21,7 @@
#include "rpl_tblmap.h"
/****************************************************************************
Replication SQL Thread
@ -164,6 +165,9 @@ typedef struct st_relay_log_info
time_t last_master_timestamp;
void clear_slave_error();
void clear_until_condition();
/*
Needed for problems when slave stops and we want to restart it
skipping one or more events in the master log that have caused
@ -322,4 +326,9 @@ typedef struct st_relay_log_info
time_t unsafe_to_stop_at;
} RELAY_LOG_INFO;
// Defined in rpl_rli.cc
int init_relay_log_info(RELAY_LOG_INFO* rli, const char* info_fname);
#endif /* RPL_RLI_H */