summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2013-12-10 11:30:23 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2013-12-10 11:30:23 -0500
commite1ed3dcebf649a540a8a5fd6293ef1494757fb38 (patch)
treec1aceb859c64219f83dbeffa4a1d46fb0923461e /sql/log.cc
parent3ad45220bc848e6cb5a06cbd71fdfb6970b5f3a4 (diff)
downloadmariadb-git-e1ed3dcebf649a540a8a5fd6293ef1494757fb38.tar.gz
MDEV#5407, MDEV#5386, MVED#4222
Problem: As, wsrep_provider is dynamic and can accept a valid provider while server is running. Patch for #4222 wrongly skips the initialization of binlog plugin during server start, when wsrep provider is not specified. In wsrep build, if opt_log_bin is not provided, we still init binlog with wsrep_emulate_bin_log ON. Fix: This patch fixes #4222 by adding a check to return from binlog_savepoint_set without proceeding further if wsrep_on is OFF/false. This patch also fixes MDEV#5407 and reverts changes pushed for MDEV#5386 (no longer valid).
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 850980f04f7..242c45a7ed7 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1708,7 +1708,7 @@ int binlog_init(void *p)
{
binlog_hton= (handlerton *)p;
#ifdef WITH_WSREP
- if (WSREP_ON && WSREP_PROVIDER_EXISTS)
+ if (WSREP_ON)
binlog_hton->state= SHOW_OPTION_YES;
else
{
@@ -2217,6 +2217,14 @@ static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv)
{
DBUG_ENTER("binlog_savepoint_set");
+#ifdef WITH_WSREP
+ /*
+ If wsrep_emulate_bin_log is true, (i.e opt_bin_log == false),
+ we should return from here if wsrep_on is off.
+ */
+ if (wsrep_emulate_bin_log && !WSREP(thd)) DBUG_RETURN(0);
+#endif /* WITH_WSREP */
+
binlog_trans_log_savepos(thd, (my_off_t*) sv);
/* Write it to the binary log */
#ifdef WITH_WSREP