[MDEV-25556] mysql_tzinfo_to_sql - OFFSET now keyword and needs to be quoted Created: 2021-04-28  Updated: 2021-09-01  Resolved: 2021-05-12

Status: Closed
Project: MariaDB Server
Component/s: Time zones
Affects Version/s: 10.6.0
Fix Version/s: 10.6.1

Type: Bug Priority: Blocker
Reporter: Daniel Black Assignee: Nikita Malyavin
Resolution: Fixed Votes: 0
Labels: not-10.2, not-10.3, not-10.4, not-10.5


 Description   

Example test container initialization:

2021-04-28 13:37:07 0 [Note] mysqld: ready for connections.
Version: '10.6.0-MariaDB-1:10.6.0+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
2021-04-28 13:37:07+00:00 [Note] [Entrypoint]: Temporary server started.
ERROR 1064 (42000) at line 26: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Offset, Is_DST, Abbreviation) VALUES
 (@time_zone_id, 0, -968, 0, 'LMT')
,(@t...' at line 1



 Comments   
Comment by Daniel Black [ 2021-05-11 ]

https://github.com/MariaDB/server/commit/a87dc3b540c6946c027d29188b645a9fd5ab184e looks good to me nikitamalyavin. Quoting the MDEV in the commit message would be good though.

Comment by Oleksandr Byelkin [ 2021-05-12 ]

OK to push

Comment by Roy Bellingan [ 2021-08-31 ]

I just tried to use from this package mariadb-10.6.4-linux-systemd-x86_64 and the issue is still present.

Comment by Daniel Black [ 2021-08-31 ]

Looks like Offset is quoted for me. What is the error generated? Are you sure you are using the mariadb-tzinfo-to-sql from the package?

$ tar -zxf ~/Downloads/mariadb-10.6.4-linux-systemd-x86_64.tar.gz
 
$ mariadb-10.6.4-linux-systemd-x86_64/bin/mariadb-tzinfo-to-sql /usr/share/zoneinfo/  | grep -i Offset | head
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES
 
$ mariadb-10.6.4-linux-systemd-x86_64/bin/mariadb-tzinfo-to-sql --version
mariadb-10.6.4-linux-systemd-x86_64/bin/mariadb-tzinfo-to-sql  Ver 1.1 Distrib 10.6.4-MariaDB, for Linux (x86_64)

Comment by Roy Bellingan [ 2021-09-01 ]

Ok I am very sorry I did mysql_tzinfo_to_sql /usr/share/zoneinfo

Using the system one, and I did not go inside the folder to use the new one

Generated at Thu Feb 08 09:38:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.