summaryrefslogtreecommitdiff
path: root/sql/tztime.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 18:40:57 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 18:40:57 +0300
commitbafc5c1321a7dff5f2da292111bf98fed9d1658d (patch)
treeb674bceb1f1fe8b2dc9a8fb7c1aeca6fd1b95dde /sql/tztime.cc
parent0025eb3f963fdca88028ff14a27d9b9638079337 (diff)
parent3b6dadb5ebedab71bf1870579745ff3cd05e498a (diff)
downloadmariadb-git-bafc5c1321a7dff5f2da292111bf98fed9d1658d.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r--sql/tztime.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc
index b7b30d36810..ca4c10975ca 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -2705,6 +2705,7 @@ main(int argc, char **argv)
}
if (opt_skip_write_binlog)
+ {
/* If skip_write_binlog is set and wsrep is compiled in we disable
sql_log_bin and wsrep_on to avoid Galera replicating below
truncate table clauses. This will allow user to set different
@@ -2712,15 +2713,9 @@ main(int argc, char **argv)
printf("set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');\n"
"prepare set_wsrep_write_binlog from @prep1;\n"
"set @toggle=0; execute set_wsrep_write_binlog using @toggle;\n");
-
- if (argc == 1 && !opt_leap)
+ }
+ else
{
- /* Argument is timezonedir */
-
- root_name_end= strmake_buf(fullname, argv[0]);
-
- if(!opt_skip_write_binlog)
- {
// Alter time zone tables to InnoDB if wsrep_on is enabled
// to allow changes to them to replicate with Galera
printf("\\d |\n"
@@ -2732,7 +2727,13 @@ main(int argc, char **argv)
"ALTER TABLE time_zone_transition_type ENGINE=InnoDB;\n"
"END IF|\n"
"\\d ;\n");
- }
+ }
+
+ if (argc == 1 && !opt_leap)
+ {
+ /* Argument is timezonedir */
+
+ root_name_end= strmake_buf(fullname, argv[0]);
printf("TRUNCATE TABLE time_zone;\n");
printf("TRUNCATE TABLE time_zone_name;\n");