[MDEV-27113] Importing timezone tables does not work in recent version Created: 2021-11-23 Updated: 2022-06-07 Resolved: 2022-06-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.6.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Remy Fox | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
According to the documentation we should take our time zone tables from https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html#time-zone-installation. Importing them gives a syntax error in 10.6.5, whereas is worked fine in 10.5 versions. |
| Comments |
| Comment by Daniel Black [ 2021-11-23 ] | ||||||||||||||||||||||||||||||||
|
MySQL documentation isn't the same as ours - https://mariadb.com/kb/en/mysql_tzinfo_to_sql/ (though in this case its pretty close). Which was the version of mariadb-tzinfo-to-sql (mariadb-tzinfo-to-sql --version)? What is the syntax error? I couldn't reproduce it. If you are using a mysql_tzinfo_to_sql before 10.6.1 you'll get the syntax error around Offset per | ||||||||||||||||||||||||||||||||
| Comment by Remy Fox [ 2021-11-23 ] | ||||||||||||||||||||||||||||||||
|
I used instructions from https://mariadb.com/kb/en/time-zones/#mysql-time-zone-tables for Windows. There is a link in the documentation to import a sql file that you can download from mysql's website. I don't have the exact error anymore, but it failed on this statement:
It's the first line which also holds an unquoted 'offset'. | ||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-11-24 ] | ||||||||||||||||||||||||||||||||
|
I'm so sorry. Here's a version https://gist.githubusercontent.com/grooverdan/809ae2cb68b062e9b2cf6406e6c14aea/raw/71535b63217251268b6f8e2e83c00deb9f0a2e34/timezones.sql We'll get on to offering it properly and stop just referring to the MySQL file. | ||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-11-25 ] | ||||||||||||||||||||||||||||||||
|
wlad how do you feel about including the timezone sql file (perhaps preloaded into table) in the Windows packaging? Given Windows can run WSL2 containers this should be easy enough though I'm sure the Windows tinezoneapi could generate the same information.
| ||||||||||||||||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2021-11-25 ] | ||||||||||||||||||||||||||||||||
|
Windows can run WSL and what not, but I would rather be hesitant to make it prerequisite for builds. Is this table preloaded on many/most Linux installations (I've no idea, did not research) ? | ||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-11-25 ] | ||||||||||||||||||||||||||||||||
|
Linux distro tend to not to preload it however the Docker Library mariadb container does. The process used to be to find https://mariadb.com/kb/en/time-zones/#mysql-time-zone-tables and get the SQL files from MySQL, which doesn't work with 10.6+. So we're at the point of integrate it into windows in some form, or provide some SQL files directly (which we might have to do for a little while with 10.6 releases out). | ||||||||||||||||||||||||||||||||
| Comment by Sascha Meyer [ 2022-05-31 ] | ||||||||||||||||||||||||||||||||
|
@DanielBlack please note that the unquoted `Offset` term in the Gist file leads to an SQL exception when running it in HeidiSQL as "Offset" seems to be a reserved term. Escaping it with grave accents solved the issue. | ||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-06-01 ] | ||||||||||||||||||||||||||||||||
|
SaschaM78, I'm a little confused. Offset is quoted with grave accents in the gist. | ||||||||||||||||||||||||||||||||
| Comment by Sascha Meyer [ 2022-06-02 ] | ||||||||||||||||||||||||||||||||
|
@DanielBlack you are right, it seems HeidiSQL had striped out the accents on copy-paste. Sorry for causing this unnecessary trouble. | ||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-06-07 ] | ||||||||||||||||||||||||||||||||
|
now mirrored - https://mirror.mariadb.org/zoneinfo/ updated https://mariadb.com/kb/en/time-zones/#mysql-time-zone-tables |