[MDEV-14896] NAME_CONST with NULL argument produces unexpected error message Created: 2018-01-08 Updated: 2018-03-08 Resolved: 2018-03-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | beginner-friendly, upstream | ||
| 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:
but both suddenly return "for internal use error" when the first argument is NULL:
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). |
| Comments |
| Comment by Aman Jain [ 2018-03-07 ] |
|
Hello elenst, I want to take up the issue. Thanks |
| Comment by Sergei Golubchik [ 2018-03-08 ] |
|
I think it's not worth fixing. The error is correct, NAME_CONST is for internal usage only. As it should never be specified manually, and nothing bad happens when it is, I'd keep the behavior as is. |
| Comment by Elena Stepanova [ 2018-03-08 ] |
|
Feel free to move it to documentation, the KB doesn't say it's for internal usage (https://mariadb.com/kb/en/library/name_const/) . I know that it is only because the MySQL manual says so. I do think that if a function is available, it should behave, but I agree it might be not worth spending time on. |
| Comment by Sergei Golubchik [ 2018-03-08 ] |
|
Ok, I've documented that it's for internal use only. |
| Comment by Aman Jain [ 2018-03-08 ] |
|
Ok. Thanks. |