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

TO_DATE: A call with wrong number of arguments causes syntax error (not standard behavior for MariaDB)

    XMLWordPrintable

Details

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

    Description

      bb-12.3-MDEV-19683-to_date f45636ea81a5a02444833e993e47c262ed52f384

      MariaDB [test]> SELECT TO_DATE() 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
      MariaDB [test]> SELECT TO_DATE('2026-01-01') 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
      

      In Oracle PL/SQL the calls also fail (first one with "not enough arguments for function" and the second one with a vague complaint about argument format), so an error is expected, but more usually in such cases we have ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT:

      MariaDB [test]> SELECT CONCAT() AS x FROM DUAL;
      ERROR 1582 (42000): Incorrect parameter count in the call to native function 'CONCAT'
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.