1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

fix error messages

when a definer for SP/view is wrong - it shold be ER_MALFORMED_DEFINER,
not ER_NO_SUCH_USER

when one uses current_role as a definer or grantee but there's no
current role - it should be ER_INVALID_ROLE not ER_MALFORMED_DEFINER

when a non-existent user is specified - it should be ER_NO_SUCH_USER,
which should say "The user does not exist", not "Definer does not exist"

clarify ER_CANT_CHANGE_TX_CHARACTERISTICS to say what cannot be changed
This commit is contained in:
Sergei Golubchik
2025-03-02 17:47:03 +01:00
parent 02b81afff8
commit 78d23a3e60
31 changed files with 120 additions and 116 deletions

View File

@@ -4960,7 +4960,7 @@ change_security_context(THD *thd,
{
if (acl_getroot(this, *definer_user, *definer_host, *definer_host, *db))
{
my_error(ER_NO_SUCH_USER, MYF(0), definer_user->str,
my_error(ER_MALFORMED_DEFINER, MYF(0), definer_user->str,
definer_host->str);
DBUG_RETURN(TRUE);
}