summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-10-11 13:54:06 -0600
committerunknown <sasha@mysql.sashanet.com>2001-10-11 13:54:06 -0600
commit56303b0383da01a94293927c209a962effd930d0 (patch)
treed2e073808531804402cf154ac12d525851282b35 /sql/repl_failsafe.cc
parent2f4e168159e72028633fe5005dd3e85211fc476e (diff)
downloadmariadb-git-56303b0383da01a94293927c209a962effd930d0.tar.gz
fixes for mysql-test to run without manager
a bit more work on failsafe replication client/mysqltest.c: added require_manager support mysql-test/mysql-test-run.sh: added --no-manager mysql-test/r/rpl_failsafe.result: updated result mysql-test/t/rpl000018.test: must have manager mysql-test/t/rpl_failsafe.test: must have manager sql/repl_failsafe.cc: more work sql/repl_failsafe.h: more work sql/slave.cc: update replication status for fail-safe replication on different events
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r--sql/repl_failsafe.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index bdd63bd9a10..40eb3b8bb7c 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -33,4 +33,11 @@ const char* rpl_status_type[] = {"AUTH_MASTER","ACTIVE_SLAVE","IDLE_SLAVE",
TYPELIB rpl_status_typelib= {array_elements(rpl_status_type)-1,"",
rpl_status_type};
+void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status)
+{
+ pthread_mutex_lock(&LOCK_rpl_status);
+ if (rpl_status == from_status || rpl_status == RPL_ANY)
+ rpl_status = to_status;
+ pthread_mutex_unlock(&LOCK_rpl_status);
+}