Bug #63376 CONVERT_TZ should fail on empty mysql.time_zone table, currently it returns NULL
| Submitted: | 22 Nov 2011 8:16 | Modified: | 23 Nov 2011 14:51 |
|---|---|---|---|
| Reporter: | Alexander Petrossian | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.1.52, 5.5.17 | OS: | Any (-enterprise-commercial-pro) |
| Assigned to: | CPU Architecture: | Any |
[22 Nov 2011 8:16]
Alexander Petrossian
[23 Nov 2011 14:51]
Valeriy Kravchuk
Our manual, http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_convert-tz, clearly says: "This function returns NULL if the arguments are invalid." If time_zone table is empty, then all time zones are unknown (invalid) arguments, hence the results: mysql> SELECT CONVERT_TZ('2004-01-01 12:00:00','GMT','MET'); +-----------------------------------------------+ | CONVERT_TZ('2004-01-01 12:00:00','GMT','MET') | +-----------------------------------------------+ | NULL | +-----------------------------------------------+ 1 row in set (0.08 sec) So, formally this is not a bug. But I'd also prefer to get a warning at least in this case (if not error message), not just NULL silently. So, I think this is a valid feature request.
[8 Jun 2017 14:33]
Abel Osorio
The Timezones table MUST BE loaded at installation time (by MySQL). Other solution could be that convert_tz to print a WARNING message indicating that Timezones table is empty. BR, Abel
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.041 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.