diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-11-24 10:22:22 -0800 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-11-24 10:22:22 -0800 |
commit | 2145c866c5ca9fc38402a5de28a15518dfb184b2 (patch) | |
tree | e33e7618e8732a5d157223feca0625771b0ee7ce /sql/sql_acl.cc | |
parent | 7d00a27fc2bb196a8cb91e9e2395856cb175194f (diff) | |
parent | 305f78c374bb97ab17f35bbe73889c735296ae7f (diff) | |
download | mariadb-git-2145c866c5ca9fc38402a5de28a15518dfb184b2.tar.gz |
auto-merge
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index eb91f66d114..ed9adbd96e1 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3462,6 +3462,13 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list, result= TRUE; continue; } + /* + No User, but a password? + They did GRANT ... TO CURRENT_USER() IDENTIFIED BY ... ! + Get the current user, and shallow-copy the new password to them! + */ + if (!tmp_Str->user.str && tmp_Str->password.str) + Str->password= tmp_Str->password; if (replace_user_table(thd, tables[0].table, *Str, (!db ? rights : 0), revoke_grant, create_new_users, test(thd->variables.sql_mode & |