Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
N/A
-
None
Description
In some cases error messages about TO_DATE format are too generic, difficult to understand what is actually wrong. For example:
|
bb-12.3-MDEV-19683-to_date-asan d5fb3dccd72d816c7181a069b91eedb3c76b2715 |
MariaDB [test]> SELECT TO_DATE('March (Mar)', 'MONTH (MON)') FROM DUAL; |
ERROR 3047 (HY000): Invalid argument error: date format not recognized at MON) in function to_date. |
MariaDB [test]> show warnings;
|
+-------+------+---------------------------------------------------------------------------------+ |
| Level | Code | Message | |
+-------+------+---------------------------------------------------------------------------------+ |
| Error | 3047 | Invalid argument error: date format not recognized at MON) in function to_date. | |
+-------+------+---------------------------------------------------------------------------------+ |
It looks odd because both MONTH and MON are perfectly valid format elements.
Oracle is more user-friendly in this case:
|
Oracle 21c |
ORA-01816: month may only be specified once |
Since such limitations aren't at all obvious – personally I can't understand why the same value is not allowed to appear twice – it would be good if the error messages were more informative.
Attachments
Issue Links
- is caused by
-
MDEV-19683 Add support for Oracle TO_DATE()
-
- Approved
-