![](https://secure.gravatar.com/avatar/9b069f7bac80d8a8416934c36ceed126.jpg?s=120&d=mm&r=g)
Alexey Botchkov 1:36 PM (0 minutes ago) to *Sergei*, developers I've made another patch, so PTAL https://github.com/MariaDB/server/commit/4ec01ec186aa93d4e7259bb4e8fc660a47b...
* 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 it either creates conflicts in our syntax.or the syntax of calling of these functions is unusual. I think i know how to get rid at least of most of these entries if not all, but i doubt it's a good idea to do this as a part of this bugfix. Finally these left are mostly SQL function calls so creating SP with this name shouldn't be encouraged. Best regards. HF 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