[Commits] Rev 3450: MDEV#5407, MDEV#5386, MVED#4222 in lp:~maria-captains/maria/maria-5.5-galera

Nirbhay Choubey nirbhay at mariadb.com
Tue Dec 10 15:44:40 EET 2013


At lp:~maria-captains/maria/maria-5.5-galera

------------------------------------------------------------
revno: 3450
revision-id: nirbhay at mariadb.com-20131210134429-90r4ogx6imaah7o5
parent: jplindst at mariadb.org-20131205172200-57xhzwmvhv4iod12
committer: Nirbhay Choubey <nirbhay at mariadb.com>
branch nick: maria-5.5-galera
timestamp: Tue 2013-12-10 08:44:29 -0500
message:
  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).
-------------- next part --------------
=== modified file 'sql/log.cc'
--- a/sql/log.cc	2013-11-29 17:50:31 +0000
+++ b/sql/log.cc	2013-12-10 13:44:29 +0000
@@ -1708,7 +1708,7 @@
 {
   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 @@
 {
   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

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2013-12-05 12:53:22 +0000
+++ b/sql/sql_base.cc	2013-12-10 13:44:29 +0000
@@ -62,7 +62,6 @@
 
 #ifdef WITH_WSREP
 #include "wsrep_mysqld.h"
-extern handlerton *binlog_hton;
 #endif // WITH_WSREP
 
 bool
@@ -1575,11 +1574,6 @@
       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;



More information about the commits mailing list