[MDEV-26093] Explicitly set session time_zone shows UTC time Created: 2021-07-06 Updated: 2021-07-06 Resolved: 2021-07-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | N/A |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Zoltán Böszörményi | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This occurs with both 10.5.9 and 10.5.11 built under Yocto 3.3, both with "genericx86-64" and "intel-corei7-64" CPU tuning builds. The timezone database from /usr/share/zoneinfo is loaded.
Can it be a configuration problem or an issue with the particular build? |
| Comments |
| Comment by Sergei Golubchik [ 2021-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
The server simply asks OS for the time. It's likely some local configuration issue. What do you get from
here, of course, it's important to have the same environment as for the mysqld process. If unsure, check /proc/<mysqld_pid>/environ | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zoltán Böszörményi [ 2021-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
mariadb is run under systemd with a quite limited set of environment variables. This is the closest I can get:
This way the commands give these results:
| ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2021-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Are your timezone tables populated properly? I see 236 rows in
and 5 rows in
My tables were freshly generated from timezone-data-2021a | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zoltán Böszörményi [ 2021-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Interesting. 0 rows for the first join query, 1 row for the second:
The number of rows in the timezone tables:
tzdata 2021a here, too. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zoltán Böszörményi [ 2021-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
mysql_tzinfo_to_sql doesn't generate rows for time_zone_transition:
| ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zoltán Böszörményi [ 2021-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Okay, it turned out to be a packaging issue with tzdata. The "zic" command in tzcode 2020b changed the default format from "-b fat" to "-b slim".
and setting the timezone works:
So it was a configuration issue, just not in MariaDB. |