diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-10-31 22:20:51 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-11-01 15:48:15 +0100 |
commit | dd6e74c62a2aa44d9d5e1790bcd36d3ff1c7d98b (patch) | |
tree | 44da24ca43ad7785d1f62679448b9d696f230f9a /sql/sql_acl.cc | |
parent | abcd09c95a49d02bf136a21d62d38a2d03672f26 (diff) | |
download | mariadb-git-dd6e74c62a2aa44d9d5e1790bcd36d3ff1c7d98b.tar.gz |
MDEV-16774 SET PASSWORD and ALTER USER with slightly different results
set both `password` and `authentication_string` columns in `mysql`.`user`
table for now.
Suppress the "password was ignored" warning if the password is
the same as the authentication string
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 733d844e5e4..fd213c528e1 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2056,7 +2056,9 @@ static bool acl_load(THD *thd, const Grant_tables& tables) user_table.authentication_string())); user.auth_string.length= strlen(user.auth_string.str); - if (user.auth_string.length && password_len) + if (user.auth_string.length && password_len && + (user.auth_string.length != password_len || + memcmp(user.auth_string.str, password, password_len))) { sql_print_warning("'user' entry '%s@%s' has both a password " "and an authentication plugin specified. The " @@ -3927,7 +3929,6 @@ static bool update_user_table(THD *thd, const User_table& user_table, { set_authentication_plugin_from_password(user_table, new_password, new_password_len); - new_password_len= 0; } if (user_table.password()) |