summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-10-08 18:47:16 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-10 22:27:36 +0200
commit03ec3511a82e90310c850ea71b395b214cab1645 (patch)
tree65e6b3dea94e4744b5b9a3bfb0f847977ed7d55a /client
parent8596b70f96fc543c2e1cac4bc8cbe58dcc4004e5 (diff)
downloadmariadb-git-03ec3511a82e90310c850ea71b395b214cab1645.tar.gz
cleanup: galera misc cleanups
also disable galera-specific output in mysql_tzinfo_to_sql, it'll be enabled later.
Diffstat (limited to 'client')
-rw-r--r--client/mysql_upgrade.c11
-rw-r--r--client/mysqlcheck.c9
2 files changed, 12 insertions, 8 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index bf33397efdb..65ea586c672 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -524,7 +524,16 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
File fd;
char query_file_path[FN_REFLEN];
#ifdef WITH_WSREP
- /* Note: wsrep_on=ON implicitly enables binary logging. */
+ /*
+ Strictly speaking, WITH_WSREP on the client only means that the
+ client was compiled with WSREP, it doesn't mean the server was,
+ so the server might not have WSREP_ON variable.
+
+ But mysql_upgrade is tightly bound to a specific server version
+ anyway - it was mysql_fix_privilege_tables_sql script embedded
+ into its binary - so even if it won't assume anything about server
+ wsrep-ness, it won't be any less server-dependend.
+ */
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0, WSREP_ON=OFF;";
#else
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0;";
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index f7ae0783e5e..fc196d2f27a 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -734,13 +734,8 @@ static int use_db(char *database)
/* 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);
+ mysql_query(sock, "SET WSREP_ON=0"); /* ignore the error, if any */
+ return run_query("SET SQL_LOG_BIN=0");
}
static int handle_request_for_tables(char *tables, uint length)