diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-01-23 16:08:24 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-01-25 17:04:14 +0100 |
commit | 1fea7e785f2de734fb3e278c9c0df2776f565c06 (patch) | |
tree | 0c0d377c94a2c518ebf503bafd62e8fc888e40b2 /sql/sql_acl.cc | |
parent | b01e2ff1cd5885eddbfcb2792222ed39548dbdd0 (diff) | |
download | mariadb-git-1fea7e785f2de734fb3e278c9c0df2776f565c06.tar.gz |
cleanup: create LEX_USER::reset_auth()
as this is used quite often
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index cdfd731ffcb..71dedd30aaf 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -984,7 +984,7 @@ static bool fix_user_plugin_ptr(ACL_USER *user) - if user->plugin is specified, user->auth is the plugin auth data. - if user->plugin is mysql_native_password or mysql_old_password, - user->auth if the password hash, and LEX_USER is transformed + user->auth is the password hash, and LEX_USER is transformed to match the next case (that is, user->plugin is cleared). - if user->plugin is NOT specified, built-in auth is assumed, that is mysql_native_password or mysql_old_password. In that case, @@ -10156,9 +10156,7 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name, thd->make_lex_string(&combo->user, combo->user.str, strlen(combo->user.str)); thd->make_lex_string(&combo->host, combo->host.str, strlen(combo->host.str)); - combo->password= null_lex_str; - combo->plugin= empty_lex_str; - combo->auth= empty_lex_str; + combo->reset_auth(); if(au) { |