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

NAME_CONST with NULL argument produces unexpected error message

Details

    Description

      MySQL manual says that NAME_CONST is for internal use only; MariaDB's doesn't. However, both MySQL and MariaDB allow it to be used with "normal" arguments:

      MariaDB [test]> select NAME_CONST('foo','bar');
      +------+
      | foo  |
      +------+
      | bar  |
      +------+
      1 row in set (0.00 sec)
      

      but both suddenly return "for internal use error" when the first argument is NULL:

      MariaDB [test]> select NAME_CONST(NULL,'bar');
      ERROR 1382 (HY000): The 'NAME_CONST' syntax is reserved for purposes internal to the MariaDB server
      

      It appears to be inconsistent, I would expect the error about wrong first argument (as it's supposed to be a valid identifier and naturally shouldn't be NULL).

      Attachments

        Activity

          elenst Elena Stepanova created issue -
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Trivial [ 5 ]
          serg Sergei Golubchik made changes -
          Fix Version/s N/A [ 14700 ]
          Fix Version/s 10.3 [ 22126 ]
          Assignee Sergei Golubchik [ serg ]
          Resolution Won't Fix [ 2 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 84791 ] MariaDB v4 [ 153528 ]

          People

            serg Sergei Golubchik
            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.