diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-07-11 13:40:39 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-07-11 13:40:39 -0400 |
commit | b6a116cede0365924e08d7f668ec3780b9db686b (patch) | |
tree | f8f793015408290ea8eac750c2ca72d0a53f77ed | |
parent | dc377fcbc0a3da99e02aa55000ab491d01c63fc4 (diff) | |
download | mariadb-git-b6a116cede0365924e08d7f668ec3780b9db686b.tar.gz |
Merge of patch for MDEV#5786.
-rw-r--r-- | client/mysql_upgrade.c | 5 | ||||
-rw-r--r-- | client/mysqlcheck.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 80d57ce9faa..bf33397efdb 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -523,7 +523,12 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res, 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)); diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 57b7ce09ab5..f7ae0783e5e 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -731,9 +731,15 @@ static int use_db(char *database) 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); } |