improve the error message for a dropped current role
This commit is contained in:
parent
4635218cb0
commit
09ec8e2e22
@ -2,4 +2,4 @@ create role r;
|
|||||||
set role r;
|
set role r;
|
||||||
drop role r;
|
drop role r;
|
||||||
revoke all on *.* from current_role;
|
revoke all on *.* from current_role;
|
||||||
ERROR 42000: There is no such grant defined for user 'r' on host ''
|
ERROR OP000: Invalid role specification `r`.
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
create role r;
|
create role r;
|
||||||
set role r;
|
set role r;
|
||||||
drop role r;
|
drop role r;
|
||||||
error ER_NONEXISTING_GRANT;
|
error ER_INVALID_ROLE;
|
||||||
revoke all on *.* from current_role;
|
revoke all on *.* from current_role;
|
||||||
|
@ -3475,13 +3475,15 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo,
|
|||||||
table->key_info->key_length);
|
table->key_info->key_length);
|
||||||
|
|
||||||
if (table->file->ha_index_read_idx_map(table->record[0], 0, user_key,
|
if (table->file->ha_index_read_idx_map(table->record[0], 0, user_key,
|
||||||
HA_WHOLE_KEY,
|
HA_WHOLE_KEY, HA_READ_KEY_EXACT))
|
||||||
HA_READ_KEY_EXACT))
|
|
||||||
{
|
{
|
||||||
/* what == 'N' means revoke */
|
/* what == 'N' means revoke */
|
||||||
if (what == 'N')
|
if (what == 'N')
|
||||||
{
|
{
|
||||||
my_error(ER_NONEXISTING_GRANT, MYF(0), combo.user.str, combo.host.str);
|
if (combo.host.length)
|
||||||
|
my_error(ER_NONEXISTING_GRANT, MYF(0), combo.user.str, combo.host.str);
|
||||||
|
else
|
||||||
|
my_error(ER_INVALID_ROLE, MYF(0), combo.user.str);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user