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
|
||||
\d |
|
||||
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_name 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;
|
||||
\d |
|
||||
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_name ENGINE=MyISAM;
|
||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||
@ -46,7 +46,7 @@ END IF|
|
||||
# Silent run
|
||||
\d |
|
||||
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_name 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;
|
||||
\d |
|
||||
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_name 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 |
|
||||
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_name ENGINE=MyISAM;
|
||||
ALTER TABLE time_zone_transition ENGINE=MyISAM;
|
||||
@ -105,21 +105,21 @@ END IF|
|
||||
#
|
||||
\d |
|
||||
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;
|
||||
END IF|
|
||||
\d ;
|
||||
TRUNCATE TABLE time_zone_leap_second;
|
||||
\d |
|
||||
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;
|
||||
END IF|
|
||||
\d ;
|
||||
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
||||
\d |
|
||||
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_name 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
|
||||
#
|
||||
# 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;
|
||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
||||
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_type ORDER BY Time_zone_id, Transition_type_id;
|
||||
# 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;
|
||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
||||
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
|
||||
#
|
||||
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;
|
||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
||||
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
|
||||
#
|
||||
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;
|
||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
||||
TRUNCATE TABLE time_zone_leap_second;
|
||||
|
Reference in New Issue
Block a user