diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-10-14 13:52:52 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-10-31 16:06:16 +0100 |
commit | 76151f3cbc0dbba2cda9a44b7b0e7dc1302c3dc4 (patch) | |
tree | eeacfba7a5dba70f6da3d2c8b666b50a82988c42 /sql/sql_yacc.yy | |
parent | 0e388d43a7efe7b68903808fa8bdb521d31aa069 (diff) | |
download | mariadb-git-76151f3cbc0dbba2cda9a44b7b0e7dc1302c3dc4.tar.gz |
Use mysql.user.authentication_string for password
Don't distinguish between a "password hash" and "authentication string"
anymore. Now both are stored in mysql.user.authentication_string, both
are handled identically internally. A "password hash" is just how some
particular plugins interpret authentication string.
Set mysql.user.plugin even if there is no password. The server will use
mysql_native_password plugin in these cases, let's make it expicit.
Remove LEX_USER::pwhash.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 3cf71d58e0d..d1ab65a5e3d 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -16254,14 +16254,14 @@ opt_for_user: ; text_or_password: - TEXT_STRING { Lex->definer->pwhash= $1;} + TEXT_STRING { Lex->definer->auth= $1;} | PASSWORD_SYM '(' TEXT_STRING ')' { Lex->definer->pwtext= $3; } | OLD_PASSWORD_SYM '(' TEXT_STRING ')' { Lex->definer->pwtext= $3; - Lex->definer->pwhash.str= Item_func_password::alloc(thd, + Lex->definer->auth.str= Item_func_password::alloc(thd, $3.str, $3.length, Item_func_password::OLD); - Lex->definer->pwhash.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323; + Lex->definer->auth.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323; } ; @@ -16825,7 +16825,7 @@ grant_user: | user IDENTIFIED_SYM BY PASSWORD_SYM TEXT_STRING { $$= $1; - $1->pwhash= $5; + $1->auth= $5; } | user IDENTIFIED_SYM via_or_with ident_or_text { |