mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
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.
This commit is contained in:
parent
40bfd20180
commit
d2cd778a27
2 changed files with 11 additions and 0 deletions
|
@ -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));
|
||||
|
|
|
@ -729,9 +729,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue