Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25556

mysql_tzinfo_to_sql - OFFSET now keyword and needs to be quoted

Details

    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
      

      Attachments

        Activity

          danblack Daniel Black added a comment -

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

          danblack Daniel Black added a comment - https://github.com/MariaDB/server/commit/a87dc3b540c6946c027d29188b645a9fd5ab184e looks good to me nikitamalyavin . Quoting the MDEV in the commit message would be good though.

          OK to push

          sanja Oleksandr Byelkin added a comment - OK to push
          RoyBellingan Roy Bellingan added a comment -

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

          RoyBellingan Roy Bellingan added a comment - I just tried to use from this package mariadb-10.6.4-linux-systemd-x86_64 and the issue is still present.
          danblack Daniel Black added a comment -

          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)
          
          

          danblack Daniel Black added a comment - 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)
          RoyBellingan Roy Bellingan added a comment -

          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

          RoyBellingan Roy Bellingan added a comment - 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

          People

            nikitamalyavin Nikita Malyavin
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.