mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
91 lines
4.8 KiB
Text
91 lines
4.8 KiB
Text
#
|
|
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
|
#
|
|
# Verbose run
|
|
set @prep=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET GLOBAL wsrep_replicate_myisam=?', 'do ?');
|
|
prepare set_wsrep_myisam from @prep;
|
|
set @toggle=1; execute set_wsrep_myisam using @toggle;
|
|
TRUNCATE TABLE time_zone;
|
|
TRUNCATE TABLE time_zone_name;
|
|
TRUNCATE TABLE time_zone_transition;
|
|
TRUNCATE TABLE time_zone_transition_type;
|
|
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
|
|
SET @time_zone_id= LAST_INSERT_ID();
|
|
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
|
|
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
|
|
(@time_zone_id, 0, 0, 0, 'GMT')
|
|
;
|
|
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/garbage' as time zone. Skipping it.
|
|
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/ignored.tab' as time zone. Skipping it.
|
|
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
|
|
SET @time_zone_id= LAST_INSERT_ID();
|
|
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('posix/GMT', @time_zone_id);
|
|
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
|
|
(@time_zone_id, 0, 0, 0, 'GMT')
|
|
;
|
|
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
|
|
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/ignored.tab' as time zone. Skipping it.
|
|
Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid infinite symlink recursion.
|
|
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;
|
|
set @toggle=0; execute set_wsrep_myisam using @toggle;
|
|
# Silent run
|
|
set @prep=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET GLOBAL wsrep_replicate_myisam=?', 'do ?');
|
|
prepare set_wsrep_myisam from @prep;
|
|
set @toggle=1; execute set_wsrep_myisam using @toggle;
|
|
TRUNCATE TABLE time_zone;
|
|
TRUNCATE TABLE time_zone_name;
|
|
TRUNCATE TABLE time_zone_transition;
|
|
TRUNCATE TABLE time_zone_transition_type;
|
|
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
|
|
SET @time_zone_id= LAST_INSERT_ID();
|
|
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
|
|
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
|
|
(@time_zone_id, 0, 0, 0, 'GMT')
|
|
;
|
|
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/garbage' as time zone. Skipping it.
|
|
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
|
|
SET @time_zone_id= LAST_INSERT_ID();
|
|
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('posix/GMT', @time_zone_id);
|
|
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
|
|
(@time_zone_id, 0, 0, 0, 'GMT')
|
|
;
|
|
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
|
|
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;
|
|
set @toggle=0; execute set_wsrep_myisam using @toggle;
|
|
#
|
|
# Testing with explicit timezonefile
|
|
#
|
|
set @prep=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET GLOBAL wsrep_replicate_myisam=?', 'do ?');
|
|
prepare set_wsrep_myisam from @prep;
|
|
set @toggle=1; execute set_wsrep_myisam using @toggle;
|
|
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
|
|
SET @time_zone_id= LAST_INSERT_ID();
|
|
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('XXX', @time_zone_id);
|
|
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
|
|
(@time_zone_id, 0, 0, 0, 'GMT')
|
|
;
|
|
set @toggle=0; execute set_wsrep_myisam using @toggle;
|
|
#
|
|
# Testing --leap
|
|
#
|
|
set @prep=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET GLOBAL wsrep_replicate_myisam=?', 'do ?');
|
|
prepare set_wsrep_myisam from @prep;
|
|
set @toggle=1; execute set_wsrep_myisam using @toggle;
|
|
TRUNCATE TABLE time_zone_leap_second;
|
|
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
|
set @toggle=0; execute set_wsrep_myisam using @toggle;
|
|
#
|
|
# MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL
|
|
#
|
|
set @prep=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET GLOBAL wsrep_replicate_myisam=?', 'do ?');
|
|
prepare set_wsrep_myisam from @prep;
|
|
set @toggle=1; execute set_wsrep_myisam using @toggle;
|
|
TRUNCATE TABLE time_zone;
|
|
TRUNCATE TABLE time_zone_name;
|
|
TRUNCATE TABLE time_zone_transition;
|
|
TRUNCATE TABLE time_zone_transition_type;
|
|
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;
|
|
set @toggle=0; execute set_wsrep_myisam using @toggle;
|