Description:
Time zone setting on Windows non-English language may contain non-ASCII chars, e.g. "Mitteleuropäische Sommerzeit" on German translated Windows 7 Professional. When this happens 'system_time_zone' is truncated at the 1st non-ASCII char and consulting it generates a warning. Theoretically this can happen in other systems too.
This is particularly relevant for Connector/J since it consults this value on every new connection and the warning keeps showing up in the logs.
Although the "How To Repeat" shows an example ran on a MySQL 5.1.73, the same results were verified with the latest MySQL 5.7 sources, so the bug may exist in all current versions.
Related bugs:
- http://clustra.no.oracle.com/orabugs/19582659
- http://clustra.no.oracle.com/orabugs/11761893 (derived from the original report)
How to repeat:
Set the time zone to "Mitteleuropäische Sommerzeit" on a Windows 7 with German language pack.
Betriebssystemname
Microsoft Windows 7 Professional
Version
6.1.7601 Service Pack 1 Build 7601
(...)
Zeitzone
Mitteleuropäische Sommerzeit
mysql> show variables like "%version%";
+-------------------------+------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------+
| protocol_version | 10 |
| version | 5.1.73-community |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | unknown |
| version_compile_os | Win64 |
+-------------------------+------------------------------+
5 rows in set (0.00 sec)
mysql> show variables like "%char%";
+--------------------------+---------------------------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.1\share\charsets\ |
+--------------------------+---------------------------------------------------------+
8 rows in set (0.00 sec)
mysql> show variables like "%zone%";
+------------------+-------------+
| Variable_name | Value |
+------------------+-------------+
| system_time_zone | Mitteleurop |
| time_zone | SYSTEM |
+------------------+-------------+
2 rows in set, 1 warning (0.01 sec)
mysql> show warnings;
+---------+------+-----------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-----------------------------------------------------------------------------+
| Warning | 1366 | Incorrect string value: '\xE4ische...' for column 'VARIABLE_VALUE' at row 1 |
+---------+------+-----------------------------------------------------------------------------+
1 row in set (0.00 sec)
Suggested fix:
-
[17 Jun 2016 14:32]
Sylvain D
This is still occurring with mysql 5.7.11
Our computers are installed with windows 7 french
show variables;
SHOW WARNINGS LIMIT 5;
Warning 1366 Incorrect string value: '\x92\xE9t\xE9)' for column 'VARIABLE_VALUE' at row 478
row 478 is system_time_zone
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders. It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.