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.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index bae2d15ba20..5e30b148ad7 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2657,9 +2657,7 @@ bool change_password(THD *thd, const char *host, const char *user,
if (WSREP(thd) && !thd->wsrep_applier)
{
query_length= sprintf(buff, "SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
- user ? user : "",
- host ? host : "",
- new_password);
+ safe_str(user), safe_str(host), new_password);
thd->set_query_inner(buff, query_length, system_charset_info);
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL);