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/structs.h | |
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/structs.h')
-rw-r--r-- | sql/structs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/structs.h b/sql/structs.h index 191463af344..986b0d64bb0 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -211,6 +211,12 @@ typedef struct st_lex_user { else l->length= strxmov(l->str= buf, user.str, "@", host.str, NullS) - buf; } + void reset_auth() + { + password.length= plugin.length= auth.length= 0; + password.str= 0; + plugin.str= auth.str= const_cast<char*>(""); + } } LEX_USER; /* |