[Commits] Rev 3509: MDEV-5786: mysql_upgrade on galera replicates "alter table" on in lp:~maria-captains/maria/maria-5.5-galera

Nirbhay Choubey nirbhay at skysql.com
Thu Jul 10 19:51:48 EEST 2014


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

------------------------------------------------------------
revno: 3509
revision-id: nirbhay at skysql.com-20140710165134-lhtmzxn62c59imhy
parent: nirbhay at skysql.com-20140709150428-ojo8tahtk9xata5c
committer: Nirbhay Choubey <nirbhay at skysql.com>
branch nick: maria-5.5-galera_5786
timestamp: Thu 2014-07-10 12:51:34 -0400
message:
  MDEV-5786: mysql_upgrade on galera replicates "alter table" on
  system tables
  
  With wsrep patch, binary logging is implicitly enabled. This
  fix makes sure that it is turned off for --skip-write-binlog
  by swithcing off wsrep_on.
-------------- next part --------------
=== modified file 'client/mysql_upgrade.c'
--- a/client/mysql_upgrade.c	2014-03-27 21:26:58 +0000
+++ b/client/mysql_upgrade.c	2014-07-10 16:51:34 +0000
@@ -523,7 +523,12 @@
   int ret;
   File fd;
   char query_file_path[FN_REFLEN];
+#ifdef WITH_WSREP
+  /* Note: wsrep_on=ON implicitly enables binary logging. */
+  const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0, WSREP_ON=OFF;";
+#else
   const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0;";
+#endif /* WITH_WSREP */
 
   DBUG_ENTER("run_query");
   DBUG_PRINT("enter", ("query: %s", query));

=== modified file 'client/mysqlcheck.c'
--- a/client/mysqlcheck.c	2014-02-17 10:00:51 +0000
+++ b/client/mysqlcheck.c	2014-07-10 16:51:34 +0000
@@ -729,9 +729,15 @@
   DBUG_RETURN(0);
 } /* use_db */
 
+/* Do not send commands to replication slaves. */
 static int disable_binlog()
 {
+#ifdef WITH_WSREP
+  /* Additionally turn off @@wsrep_on to disable implicit binary logging. */
+  const char *stmt= "SET SQL_LOG_BIN=0, WSREP_ON=OFF";
+#else
   const char *stmt= "SET SQL_LOG_BIN=0";
+#endif /* WITH_WSREP */
   return run_query(stmt);
 }
 



More information about the commits mailing list