summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorSeppo Jaakola <seppo.jaakola@codership.com>2012-04-13 01:33:24 +0300
committerSeppo Jaakola <seppo.jaakola@codership.com>2012-04-13 01:33:24 +0300
commit2fc1ec43560b453b4694adbc1aac11f3f23b1761 (patch)
tree880c3875dae28574a90bf891ef901027723d21f6 /sql/slave.cc
parent51c77ec5d406843bb8c8131f0687f4f75839d045 (diff)
downloadmariadb-git-2fc1ec43560b453b4694adbc1aac11f3f23b1761.tar.gz
Initial push of codership-wsrep API implementation for MariaDB.
Merge of: lp:maria/5.5, #3334: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3334 lp:codership-mysql/5.5, #3725: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3725
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 56f9c14703c..833820203b0 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -53,6 +53,9 @@
// Create_file_log_event,
// Format_description_log_event
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif
#ifdef HAVE_REPLICATION
#include "rpl_tblmap.h"
@@ -3487,6 +3490,11 @@ pthread_handler_t handle_slave_sql(void *arg)
#endif
DBUG_ASSERT(rli->sql_thd == thd);
+#ifdef WITH_WSREP
+ thd->wsrep_exec_mode= LOCAL_STATE;
+ /* synchronize with wsrep replication */
+ wsrep_ready_wait ();
+#endif
DBUG_PRINT("master_info",("log_file_name: %s position: %s",
rli->group_master_log_name,
llstr(rli->group_master_log_pos,llbuff)));