summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/log.cc10
-rw-r--r--sql/sql_base.cc6
2 files changed, 9 insertions, 7 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
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 62fb340cc6e..3acfa63d55e 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -62,7 +62,6 @@
#ifdef WITH_WSREP
#include "wsrep_mysqld.h"
-extern handlerton *binlog_hton;
#endif // WITH_WSREP
bool
@@ -1575,11 +1574,6 @@ void close_thread_tables(THD *thd)
handled either before writing a query log event (inside
binlog_query()) or when preparing a pending event.
*/
-#ifdef WITH_WSREP
- /* In Galera binlog is not enabled by default in case when
- wsrep provider is not specified. */
- if ((WSREP_ON && WSREP_PROVIDER_EXISTS) || binlog_hton->state == SHOW_OPTION_YES)
-#endif
(void)thd->binlog_flush_pending_rows_event(TRUE);
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;