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

NAME_CONST with NULL argument produces unexpected error message

    XMLWordPrintable

    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

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: