mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-21209 : mysql_tzinfo_to_sql's Galera checks do not work
wsrep_on parameter can be visible even when wsrep_on is set OFF so we need to check variable_value from I_S also.
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
# Verbose run
|
# Verbose run
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=InnoDB;
|
ALTER TABLE time_zone ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
||||||
@ -36,7 +36,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
|
|||||||
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
@ -46,7 +46,7 @@ END IF|
|
|||||||
# Silent run
|
# Silent run
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=InnoDB;
|
ALTER TABLE time_zone ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
||||||
@ -75,7 +75,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
|
|||||||
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
@ -93,7 +93,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
|
|||||||
;
|
;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
@ -105,21 +105,21 @@ END IF|
|
|||||||
#
|
#
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone_leap_second ENGINE=InnoDB;
|
ALTER TABLE time_zone_leap_second ENGINE=InnoDB;
|
||||||
END IF|
|
END IF|
|
||||||
\d ;
|
\d ;
|
||||||
TRUNCATE TABLE time_zone_leap_second;
|
TRUNCATE TABLE time_zone_leap_second;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone_leap_second ENGINE=MyISAM;
|
ALTER TABLE time_zone_leap_second ENGINE=MyISAM;
|
||||||
END IF|
|
END IF|
|
||||||
\d ;
|
\d ;
|
||||||
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
@ -131,7 +131,7 @@ END IF|
|
|||||||
#
|
#
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=InnoDB;
|
ALTER TABLE time_zone ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
||||||
@ -146,7 +146,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
|
|||||||
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Verbose run
|
# Verbose run
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=InnoDB;
|
ALTER TABLE time_zone ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
||||||
@ -36,7 +36,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
|
|||||||
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
@ -46,7 +46,7 @@ END IF|
|
|||||||
# Silent run
|
# Silent run
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=InnoDB;
|
ALTER TABLE time_zone ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
ALTER TABLE time_zone_name ENGINE=InnoDB;
|
||||||
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
ALTER TABLE time_zone_transition ENGINE=InnoDB;
|
||||||
@ -75,7 +75,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
|
|||||||
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
@ -93,7 +93,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
|
|||||||
;
|
;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
@ -105,21 +105,21 @@ END IF|
|
|||||||
#
|
#
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone_leap_second ENGINE=InnoDB;
|
ALTER TABLE time_zone_leap_second ENGINE=InnoDB;
|
||||||
END IF|
|
END IF|
|
||||||
\d ;
|
\d ;
|
||||||
TRUNCATE TABLE time_zone_leap_second;
|
TRUNCATE TABLE time_zone_leap_second;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone_leap_second ENGINE=MyISAM;
|
ALTER TABLE time_zone_leap_second ENGINE=MyISAM;
|
||||||
END IF|
|
END IF|
|
||||||
\d ;
|
\d ;
|
||||||
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
||||||
\d |
|
\d |
|
||||||
IF (select count(*) from information_schema.global_variables where
|
IF (select count(*) from information_schema.global_variables where
|
||||||
variable_name='wsrep_on') = 1 THEN
|
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
|
||||||
ALTER TABLE time_zone ENGINE=MyISAM;
|
ALTER TABLE time_zone ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
ALTER TABLE time_zone_name ENGINE=MyISAM;
|
||||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
||||||
#
|
#
|
||||||
# Verbose run
|
# Verbose run
|
||||||
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');
|
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 ?');
|
||||||
prepare set_wsrep_write_binlog from @prep1;
|
prepare set_wsrep_write_binlog from @prep1;
|
||||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
||||||
TRUNCATE TABLE time_zone;
|
TRUNCATE TABLE time_zone;
|
||||||
@ -29,7 +29,7 @@ Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid in
|
|||||||
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
|
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
|
||||||
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
||||||
# Silent run
|
# Silent run
|
||||||
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');
|
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 ?');
|
||||||
prepare set_wsrep_write_binlog from @prep1;
|
prepare set_wsrep_write_binlog from @prep1;
|
||||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
||||||
TRUNCATE TABLE time_zone;
|
TRUNCATE TABLE time_zone;
|
||||||
@ -55,7 +55,7 @@ ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
|||||||
#
|
#
|
||||||
# Testing with explicit timezonefile
|
# Testing with explicit timezonefile
|
||||||
#
|
#
|
||||||
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');
|
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 ?');
|
||||||
prepare set_wsrep_write_binlog from @prep1;
|
prepare set_wsrep_write_binlog from @prep1;
|
||||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
||||||
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
|
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
|
||||||
@ -67,7 +67,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
|
|||||||
#
|
#
|
||||||
# Testing --leap
|
# Testing --leap
|
||||||
#
|
#
|
||||||
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');
|
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 ?');
|
||||||
prepare set_wsrep_write_binlog from @prep1;
|
prepare set_wsrep_write_binlog from @prep1;
|
||||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
||||||
TRUNCATE TABLE time_zone_leap_second;
|
TRUNCATE TABLE time_zone_leap_second;
|
||||||
|
3
mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt
Normal file
3
mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --binlog_format=ROW
|
||||||
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
--source include/have_wsrep.inc
|
--source include/have_wsrep.inc
|
||||||
--source include/have_symlink.inc
|
--source include/have_symlink.inc
|
||||||
--source include/not_windows.inc
|
--source include/not_windows.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --binlog_format=ROW
|
||||||
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
--source include/have_wsrep.inc
|
--source include/have_wsrep.inc
|
||||||
--source include/have_symlink.inc
|
--source include/have_symlink.inc
|
||||||
--source include/not_windows.inc
|
--source include/not_windows.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
||||||
|
@ -2443,7 +2443,7 @@ print_tz_leaps_as_sql(const TIME_ZONE_INFO *sp)
|
|||||||
if (!opt_skip_write_binlog)
|
if (!opt_skip_write_binlog)
|
||||||
printf("\\d |\n"
|
printf("\\d |\n"
|
||||||
"IF (select count(*) from information_schema.global_variables where\n"
|
"IF (select count(*) from information_schema.global_variables where\n"
|
||||||
"variable_name='wsrep_on') = 1 THEN\n"
|
"variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
|
||||||
"ALTER TABLE time_zone_leap_second ENGINE=InnoDB;\n"
|
"ALTER TABLE time_zone_leap_second ENGINE=InnoDB;\n"
|
||||||
"END IF|\n"
|
"END IF|\n"
|
||||||
"\\d ;\n");
|
"\\d ;\n");
|
||||||
@ -2463,7 +2463,7 @@ print_tz_leaps_as_sql(const TIME_ZONE_INFO *sp)
|
|||||||
if (!opt_skip_write_binlog)
|
if (!opt_skip_write_binlog)
|
||||||
printf("\\d |\n"
|
printf("\\d |\n"
|
||||||
"IF (select count(*) from information_schema.global_variables where\n"
|
"IF (select count(*) from information_schema.global_variables where\n"
|
||||||
"variable_name='wsrep_on') = 1 THEN\n"
|
"variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
|
||||||
"ALTER TABLE time_zone_leap_second ENGINE=MyISAM;\n"
|
"ALTER TABLE time_zone_leap_second ENGINE=MyISAM;\n"
|
||||||
"END IF|\n"
|
"END IF|\n"
|
||||||
"\\d ;\n");
|
"\\d ;\n");
|
||||||
@ -2719,7 +2719,7 @@ main(int argc, char **argv)
|
|||||||
sql_log_bin and wsrep_on to avoid Galera replicating below
|
sql_log_bin and wsrep_on to avoid Galera replicating below
|
||||||
truncate table clauses. This will allow user to set different
|
truncate table clauses. This will allow user to set different
|
||||||
time zones to nodes in Galera cluster. */
|
time zones to nodes in Galera cluster. */
|
||||||
printf("set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');\n"
|
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"
|
"prepare set_wsrep_write_binlog from @prep1;\n"
|
||||||
"set @toggle=0; execute set_wsrep_write_binlog using @toggle;\n");
|
"set @toggle=0; execute set_wsrep_write_binlog using @toggle;\n");
|
||||||
|
|
||||||
@ -2735,7 +2735,7 @@ main(int argc, char **argv)
|
|||||||
// to allow changes to them to replicate with Galera
|
// to allow changes to them to replicate with Galera
|
||||||
printf("\\d |\n"
|
printf("\\d |\n"
|
||||||
"IF (select count(*) from information_schema.global_variables where\n"
|
"IF (select count(*) from information_schema.global_variables where\n"
|
||||||
"variable_name='wsrep_on') = 1 THEN\n"
|
"variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
|
||||||
"ALTER TABLE time_zone ENGINE=InnoDB;\n"
|
"ALTER TABLE time_zone ENGINE=InnoDB;\n"
|
||||||
"ALTER TABLE time_zone_name ENGINE=InnoDB;\n"
|
"ALTER TABLE time_zone_name ENGINE=InnoDB;\n"
|
||||||
"ALTER TABLE time_zone_transition ENGINE=InnoDB;\n"
|
"ALTER TABLE time_zone_transition ENGINE=InnoDB;\n"
|
||||||
@ -2790,7 +2790,7 @@ main(int argc, char **argv)
|
|||||||
// Fall back to MyISAM
|
// Fall back to MyISAM
|
||||||
printf("\\d |\n"
|
printf("\\d |\n"
|
||||||
"IF (select count(*) from information_schema.global_variables where\n"
|
"IF (select count(*) from information_schema.global_variables where\n"
|
||||||
"variable_name='wsrep_on') = 1 THEN\n"
|
"variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
|
||||||
"ALTER TABLE time_zone ENGINE=MyISAM;\n"
|
"ALTER TABLE time_zone ENGINE=MyISAM;\n"
|
||||||
"ALTER TABLE time_zone_name ENGINE=MyISAM;\n"
|
"ALTER TABLE time_zone_name ENGINE=MyISAM;\n"
|
||||||
"ALTER TABLE time_zone_transition ENGINE=MyISAM;\n"
|
"ALTER TABLE time_zone_transition ENGINE=MyISAM;\n"
|
||||||
|
Reference in New Issue
Block a user