summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql_upgrade.c5
-rw-r--r--client/mysqlcheck.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 737f9c9c8d7..e7170201a2a 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -536,7 +536,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 c1fec38ca8c..af61832fa0c 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -863,9 +863,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, 0);
}