Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.0, 10.1, 10.2, 10.3
-
Fix Version/s: 10.3.5
-
Component/s: Temporal Types
-
Labels:None
Description
SELECT
|
LAST_DAY(TIME'00:00:00') AS c1, |
CAST(CAST(LAST_DAY(TIME'00:00:00') AS DATE) AS TIME) AS c2, |
CAST(LAST_DAY(TIME'00:00:00') AS TIME) AS c3; |
+------------+----------+------+
|
| c1 | c2 | c3 |
|
+------------+----------+------+
|
| 2018-02-28 | 00:00:00 | NULL |
|
+------------+----------+------+
|
Notice, LAST_DAY(TIME'00:00:00') correctly returns the last day of the current month.
If I now cast this expression as DATE, and then cast as TIME again (like in c2), it correctly returns 00:00:00.
But if I cast this expression directly to TIME (like in c3), it erroneously returns NULL.
It should return 00:00:00 in the column c3.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
-
- Closed
-
-
MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
-
- Closed
-
- duplicates
-
MDEV-15340 Wrong result HOUR(case_expression_with_time_and_datetime)
-
- Closed
-