I've made another patch, so PTAL
https://github.com/MariaDB/server/commit/4ec01ec186aa93d4e7259bb4e8fc660a47b9d900

> * built-in functions use IDENT_sys (no keywords allowed) in function_call_generic
> * functions with keyword names are explicitly listed in function_call_conflict.
> * stored function invocations use IDENT_sys via function_call_generic

> but

> * stored function declaration uses sp_name (that is keyword_ident) rule

That's right.

> But also, I expect it to make function_call_conflict redundant, because
> all names from there should be in IDENT_funcname.

I did all i could moving names from the function_call_conflict to the keyword_funcname,
and also from function_call_nonkeyword to the item_create.cc
But couldn't eliminate either as 

I don't see ways to do it easily, as they truly represent conflicts in syntax produced
by these names used in expressions with other purpose.
For instance the ASCII_SYM is a function and at the same time 


On Wed, Dec 27, 2023 at 5:57 PM Sergei Golubchik via developers <developers@lists.mariadb.org> wrote:
Hi, Alexey,

On Dec 27, Alexey Botchkov wrote:
> revision-id: 0c0721cb2f7 (mariadb-10.6.16-45-g0c0721cb2f7)
> parent(s): aff5ed3988a
> author: Alexey Botchkov
> committer: Alexey Botchkov
> timestamp: 2023-12-19 00:00:48 +0400
> message:
>
> MDEV-31616 Problems with a stored function EMPTY() on upgrade to 10.6.
>
> The IDENT_sys doesn't include keywords, so the fucntion with the

typo: fucntion

> keyword name can be created, but cannot be called.
> Moving some keywords to keyword_funcname set so the functions with these
> names are allowed.

The current logic in the code is:

* built-in functions use IDENT_sys (no keywords allowed) in function_call_generic
* functions with keyword names are explicitly listed in function_call_conflict.
* stored function invocations use IDENT_sys via function_call_generic

but

* stored function declaration uses sp_name (that is keyword_ident) rule

so, it'd make sense to introduce IDENT_funcname and use it instead of
IDENT_sys in function_call_generic. That was a good idea.

But also, I expect it to make function_call_conflict redundant, because
all names from there should be in IDENT_funcname.

And the patch doesn't solve the issue that many keywords from IDENT_sys
are not in IDENT_funcname. So it's still possible to create functions
that cannot be invoked.

Note, that simply changing sp_name to use IDENT_funcname is not correct,
because stored procedure names have different limitations.

Regards,
Sergei
Chief Architect, MariaDB Server
and security@mariadb.org
_______________________________________________
developers mailing list -- developers@lists.mariadb.org
To unsubscribe send an email to developers-leave@lists.mariadb.org