MDEV-9940 CREATE ROLE blocked by password validation plugin

This commit is contained in:
Sergei Golubchik 2016-04-30 09:09:10 +02:00
commit 4db2ebb1fe
3 changed files with 9 additions and 1 deletions

View file

@ -3458,7 +3458,7 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo,
}
if (!old_row_exists || combo.pwtext.length || combo.pwhash.length)
if (validate_password(&combo))
if (!handle_as_role && validate_password(&combo))
goto end;
/* Update table columns with new privileges */