[MDEV-6101] Hybrid functions do not add CURRENT_DATE when converting TIME to DATETIME Created: 2014-04-15  Updated: 2014-06-06  Resolved: 2014-06-06

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.10
Fix Version/s: 10.0.12

Type: Bug Priority: Critical
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: compat56

Issue Links:
Blocks
blocks MDEV-6001 Merge tests for MySQL WL#946 TIME/DAT... Stalled

 Description   

Hybrid functions IF, IFNULL,CASE,COALESCE do not add
CURRENT_TIME when converting TIME to DATETIME:

mysql> SELECT IF(1,TIME'10:10:10',DATE'2001-01-01');
+---------------------------------------+
| IF(1,TIME'10:10:10',DATE'2001-01-01') |
+---------------------------------------+
| 0000-00-00 10:10:10                   |
+---------------------------------------+
1 row in set (0.01 sec)

MySQL-5.6 correctly adds CURRENT_DATE:

+---------------------------------------+
| IF(1,TIME'10:10:10',DATE'2001-01-01') |
+---------------------------------------+
| 2014-04-15 10:10:10                   |
+---------------------------------------+
1 row in set (0.00 sec)


Generated at Thu Feb 08 07:09:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.