summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index bf18581de4f..3727bf7d7ce 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1956,7 +1956,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 "
@@ -3333,7 +3335,7 @@ end:
close_mysql_tables(thd);
#ifdef WITH_WSREP
-error: // this label is used in WSREP_TO_ISOLATION_BEGIN
+WSREP_ERROR_LABEL:
if (WSREP(thd) && !thd->wsrep_applier)
{
WSREP_TO_ISOLATION_END;
@@ -3496,7 +3498,7 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
}
#ifdef WITH_WSREP
-error: // this label is used in WSREP_TO_ISOLATION_END
+WSREP_ERROR_LABEL:
if (WSREP(thd) && !thd->wsrep_applier)
{
WSREP_TO_ISOLATION_END;
@@ -3829,7 +3831,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())