mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
b611ac06a7
Factory timezone is supposed "For companies who don't want to put time zone specification in their installation procedures. When users run date, they'll get the message. Also useful for the "comp.sources" version." This "message" is exposed as timezone abbreviation, which is supposed to be short and thus may cause generated INSERT statements to fail. Do not attempt to load Factory timezone.
71 lines
3.4 KiB
Text
71 lines
3.4 KiB
Text
#
|
|
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
|
#
|
|
# Verbose run
|
|
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;
|
|
# Silent run
|
|
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;
|
|
#
|
|
# Testing with explicit timezonefile
|
|
#
|
|
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')
|
|
;
|
|
#
|
|
# Testing --leap
|
|
#
|
|
TRUNCATE TABLE time_zone_leap_second;
|
|
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
|
#
|
|
# MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL
|
|
#
|
|
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;
|