Commit 4db2ebb1 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-9940 CREATE ROLE blocked by password validation plugin

parent 357f4d83
...@@ -147,6 +147,8 @@ grant select on *.* to foo2 identified with mysql_old_password using '2222222222 ...@@ -147,6 +147,8 @@ grant select on *.* to foo2 identified with mysql_old_password using '2222222222
drop user foo2; drop user foo2;
set global strict_password_validation=1; set global strict_password_validation=1;
drop user foo1; drop user foo1;
create role r1;
drop role r1;
uninstall plugin simple_password_check; uninstall plugin simple_password_check;
create user foo1 identified by 'pwd'; create user foo1 identified by 'pwd';
drop user foo1; drop user foo1;
...@@ -103,6 +103,12 @@ drop user foo2; ...@@ -103,6 +103,12 @@ drop user foo2;
set global strict_password_validation=1; set global strict_password_validation=1;
drop user foo1; drop user foo1;
#
# MDEV-9940 CREATE ROLE blocked by password validation plugin
#
create role r1;
drop role r1;
uninstall plugin simple_password_check; uninstall plugin simple_password_check;
create user foo1 identified by 'pwd'; create user foo1 identified by 'pwd';
......
...@@ -3458,7 +3458,7 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo, ...@@ -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 (!old_row_exists || combo.pwtext.length || combo.pwhash.length)
if (validate_password(&combo)) if (!handle_as_role && validate_password(&combo))
goto end; goto end;
/* Update table columns with new privileges */ /* Update table columns with new privileges */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment