summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorlars@mysql.com/black.(none) <>2006-10-31 12:23:14 +0100
committerlars@mysql.com/black.(none) <>2006-10-31 12:23:14 +0100
commit1e038dc88212be986fb90829a9d90cafcfe51530 (patch)
tree0584ef2139b064ede7df1f13ef4aac8d83c09faf /sql/sql_repl.cc
parent3a3d673dd5386c8ecb359743a2bfec5faee98193 (diff)
downloadmariadb-git-1e038dc88212be986fb90829a9d90cafcfe51530.tar.gz
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.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 52489087b02..0fff99fbc8f 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -805,7 +805,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
sizeof(mi->rli.until_log_name)-1);
}
else
- clear_until_condition(&mi->rli);
+ mi->rli.clear_until_condition();
if (mi->rli.until_condition != RELAY_LOG_INFO::UNTIL_NONE)
{
@@ -978,8 +978,8 @@ int reset_slave(THD *thd, MASTER_INFO* mi)
Reset errors (the idea is that we forget about the
old master).
*/
- clear_slave_error(&mi->rli);
- clear_until_condition(&mi->rli);
+ mi->rli.clear_slave_error();
+ mi->rli.clear_until_condition();
// close master_info_file, relay_log_info_file, set mi->inited=rli->inited=0
end_master_info(mi);
@@ -1244,8 +1244,8 @@ bool change_master(THD* thd, MASTER_INFO* mi)
pthread_mutex_lock(&mi->rli.data_lock);
mi->rli.abort_pos_wait++; /* for MASTER_POS_WAIT() to abort */
/* Clear the errors, for a clean start */
- clear_slave_error(&mi->rli);
- clear_until_condition(&mi->rli);
+ mi->rli.clear_slave_error();
+ mi->rli.clear_until_condition();
/*
If we don't write new coordinates to disk now, then old will remain in
relay-log.info until START SLAVE is issued; but if mysqld is shutdown