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

TO_DATE: Result with a single NULL argument incompatible with Oracle

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Won't Fix
    • N/A
    • N/A
    • Server
    • None
    • Not for Release Notes

    Description

      This is a corner case of MDEV-38514 (which is already a special case).

      I don't think Oracle behavior is even correct, but given that a query passes on Oracle and fails on MariaDB, it's a slight incompatibility. Feel free to close as won't fix.

      Upon a call of TO_DATE with a single NULL argument, Oracle does not return an error (as it does without any argument or with a single non-NULL argument), but returns NULL instead. MariaDB currently fails with a syntax error as described in MDEV-38514, and even if it's fixed, it will still be failing with a wrong number of arguments.

      bb-12.3-MDEV-19683-to_date f45636ea81a5a02444833e993e47c262ed52f384

      MariaDB [test]> SELECT TO_DATE(NULL) AS x;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AS x' at line 1
      

      Oracle

      SELECT TO_DATE(NULL) AS x;
       
      X
      
      

      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.