[MDEV-4653] Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') Created: 2013-06-13  Updated: 2013-08-08  Resolved: 2013-08-08

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.3, 5.5.31, 5.3.13
Fix Version/s: 10.0.4, 5.5.33, 5.3.13

Type: Bug Priority: Minor
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

This SQL query returns a wrong result:

mysql> SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5'); show warnings;
+----------------------------------------------+
| CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') |
+----------------------------------------------+
| 0000-00-00 00:00:00                          |
+----------------------------------------------+
1 row in set (0.00 sec)

The expected result is NULL with a warning.
The same problem happens in this query:

mysql> SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5');
+---------------------------------------------------------+
| CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5') |
+---------------------------------------------------------+
| 0000-00-00 00:00:00                                     |
+---------------------------------------------------------+
1 row in set (0.00 sec)

Note: this problem is not repeatable with mysql-5.1, 5.5.



 Comments   
Comment by Alexander Barkov [ 2013-08-08 ]

Pushed into 5.3.13 and 5.5.32.

Generated at Thu Feb 08 06:58:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.