Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Won't Fix
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
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).
Hello elenst, I want to take up the issue.
What error message should I print in such a case? Is there any pre-defined error message in <sql/share/errmsg-utf8.txt> or do I have to create a new error code as ER_FIRST_ARGUMENT_CANT_NULL.
Thanks