Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
N/A
-
None
-
Not for Release Notes
Description
The review notes said that TO_DATE should return DATETIME(0) (and there is also FF extension to get fractional seconds). However, if the format is read from a table instead of a constant, the function returns DATETIME(6) even without FF:
CREATE TABLE t (fmt VARCHAR(64)); |
INSERT INTO t VALUES ('YYYY-MM-DD'); |
SELECT TO_DATE('2026-01-01', fmt) FROM t; |
SELECT TO_DATE('2026-01-01', 'YYYY-MM-DD') FROM t; |
|
bb-12.3-MDEV-19683-to_date 7cbf7a8c641379d4318067607b71704956e87e5e |
SELECT TO_DATE('2026-01-01', fmt) FROM t; |
TO_DATE('2026-01-01', fmt) |
2026-01-01 00:00:00.000000
|
SELECT TO_DATE('2026-01-01', 'YYYY-MM-DD') FROM t; |
TO_DATE('2026-01-01', 'YYYY-MM-DD') |
2026-01-01 00:00:00
|
Attachments
Issue Links
- is caused by
-
MDEV-19683 Add support for Oracle TO_DATE()
-
- In Testing
-