Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-38509

TO_DATE: AD_DOT does not appear to be supported

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 12.3.1
    • Server
    • None
    • Not for Release Notes

    Description

      The commit comment says that AD_DOT format element is supported, but it doesn't seem to be the case:

      bb-12.3-MDEV-19683-to_date f45636ea81a5a02444833e993e47c262ed52f384

      MariaDB [test]> SELECT TO_DATE('A.D. 2026-01-08','A.D. YYYY-MM-DD') AS x;
      +------+
      | x    |
      +------+
      | NULL |
      +------+
      1 row in set, 1 warning (0.001 sec)
       
      MariaDB [test]> show warnings;
      +---------+------+------------------------------------------------------------------+
      | Level   | Code | Message                                                          |
      +---------+------+------------------------------------------------------------------+
      | Warning | 1411 | Incorrect datetime value: 'A.D. 2026-01-08' for function to_date |
      +---------+------+------------------------------------------------------------------+
      1 row in set (0.001 sec)
      

      Oracle PL/SQL

      SELECT TO_DATE('A.D. 2026-01-08','A.D. YYYY-MM-DD') AS x;
       
      X
      08-JAN-26
      

      AD works:

      MariaDB [test]> SELECT TO_DATE('AD 2026-01-08','AD YYYY-MM-DD') AS x;
      +---------------------+
      | x                   |
      +---------------------+
      | 2026-01-08 00:00:00 |
      +---------------------+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.