diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-10-18 11:41:40 -0700 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-10-18 11:41:40 -0700 |
commit | ac6877d420a70e215c59f1c85cfe80c6a71cf349 (patch) | |
tree | eacddfe96382dcd8f07d60b5e171049381247c58 /sql/sql_yacc.yy | |
parent | 4cc8cda346bdd63c7e3882d687ba01143856b5dd (diff) | |
download | mariadb-git-ac6877d420a70e215c59f1c85cfe80c6a71cf349.tar.gz |
SET PASSWORD bugfixes:
* work as documented, use CURRENT_USER()
* move the check for ER_PASSWORD_ANONYMOUS_USER where it can actually work
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 0c77d66c30f..dd874caf4b0 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -13884,10 +13884,9 @@ option_value: my_error(ER_SP_BAD_VAR_SHADOW, MYF(0), pw.str); MYSQL_YYABORT; } - if (!(user=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))) + if (!(user=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))) MYSQL_YYABORT; - user->host=null_lex_str; - user->user.str=thd->security_ctx->user; + user->user= current_user; set_var_password *var= new set_var_password(user, $3); if (var == NULL) MYSQL_YYABORT; |