1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
Sergei Golubchik
2018-10-31 22:20:51 +01:00
parent abcd09c95a
commit dd6e74c62a
5 changed files with 21 additions and 20 deletions

View File

@ -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())