Skip to content

Commit b6a116c

Browse files
author
Nirbhay Choubey
committed
Merge of patch for MDEV#5786.
1 parent dc377fc commit b6a116c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

client/mysql_upgrade.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,12 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
523523
int ret;
524524
File fd;
525525
char query_file_path[FN_REFLEN];
526+
#ifdef WITH_WSREP
527+
/* Note: wsrep_on=ON implicitly enables binary logging. */
528+
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0, WSREP_ON=OFF;";
529+
#else
526530
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0;";
531+
#endif /* WITH_WSREP */
527532

528533
DBUG_ENTER("run_query");
529534
DBUG_PRINT("enter", ("query: %s", query));

client/mysqlcheck.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,9 +731,15 @@ static int use_db(char *database)
731731
DBUG_RETURN(0);
732732
} /* use_db */
733733

734+
/* Do not send commands to replication slaves. */
734735
static int disable_binlog()
735736
{
737+
#ifdef WITH_WSREP
738+
/* Additionally turn off @@wsrep_on to disable implicit binary logging. */
739+
const char *stmt= "SET SQL_LOG_BIN=0, WSREP_ON=OFF";
740+
#else
736741
const char *stmt= "SET SQL_LOG_BIN=0";
742+
#endif /* WITH_WSREP */
737743
return run_query(stmt);
738744
}
739745

0 commit comments

Comments
 (0)