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:
@@ -2854,7 +2854,7 @@ bool sp_process_definer(THD *thd)
|
||||
if (!is_acl_user(lex->definer->host, lex->definer->user))
|
||||
{
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
|
||||
ER_NO_SUCH_USER, ER_THD(thd, ER_NO_SUCH_USER),
|
||||
ER_MALFORMED_DEFINER, ER_THD(thd, ER_MALFORMED_DEFINER),
|
||||
lex->definer->user.str, lex->definer->host.str);
|
||||
}
|
||||
#endif /* NO_EMBEDDED_ACCESS_CHECKS */
|
||||
@@ -10001,7 +10001,7 @@ LEX_USER *create_default_definer(THD *thd, bool role)
|
||||
|
||||
if (role && definer->user.length == 0)
|
||||
{
|
||||
my_error(ER_MALFORMED_DEFINER, MYF(0));
|
||||
my_error(ER_INVALID_ROLE, MYF(0), "NONE");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user