Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.3.12, 5.5.36, 10.0.10
-
None
Description
For the query:
SELECT CAST(010203101112 AS DATETIME(1)) AS c1,CAST(010203101112.3+0e0 AS DATETIME(1)) AS c2,CAST(010203101112.3+0e0 AS DATETIME(1)) AS c3;
|
MySQL5.6 consistently returns values with YEAR=2001:
+-----------------------+-----------------------+-----------------------+
|
| c1 | c2 | c3 |
|
+-----------------------+-----------------------+-----------------------+
|
| 2001-02-03 10:11:12.0 | 2001-02-03 10:11:12.3 | 2001-02-03 10:11:12.3 |
|
+-----------------------+-----------------------+-----------------------+
|
MariaDB returns either 2001 or 0001 in year:
+-----------------------+-----------------------+-----------------------+
|
| c1 | c2 | c3 |
|
+-----------------------+-----------------------+-----------------------+
|
| 2001-02-03 10:11:12.0 | 0001-02-03 10:11:12.2 | 0001-02-03 10:11:12.2 |
|
+-----------------------+-----------------------+-----------------------+
|
MySQL-5.6 results look better.
Attachments
Issue Links
- blocks
-
MDEV-6001 Merge tests for MySQL WL#946 TIME/DATETIME/TIMESTAMP with fractional precision
- Stalled