summaryrefslogtreecommitdiff
path: root/sql/structs.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2019-02-14 22:07:33 -0800
committerIgor Babaev <igor@askmonty.org>2019-02-14 22:07:33 -0800
commit98d55b1366746a2b4750da9e8781f66b0d01ed85 (patch)
treeff062a3ec4e6a760d5c45e9db4f1fd292cfadbbe /sql/structs.h
parentccce4d3be9bb5dfce66576f9744bcb927b754cf4 (diff)
parent282ba973e748456a829eecf1b49fb352870c6a8f (diff)
downloadmariadb-git-98d55b1366746a2b4750da9e8781f66b0d01ed85.tar.gz
Merge branch '10.4' into bb-10.4-mdev16188
Diffstat (limited to 'sql/structs.h')
-rw-r--r--sql/structs.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/sql/structs.h b/sql/structs.h
index 3628cd01748..1eac31d8659 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -1,8 +1,8 @@
#ifndef STRUCTS_INCLUDED
#define STRUCTS_INCLUDED
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
- Copyright (c) 2017, MariaDB Corporation.
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -219,6 +219,17 @@ extern const char *show_comp_option_name[];
typedef int *(*update_var)(THD *, struct st_mysql_show_var *);
+struct USER_AUTH : public Sql_alloc
+{
+ LEX_CSTRING plugin, auth_str, pwtext;
+ USER_AUTH *next;
+ USER_AUTH() : next(NULL)
+ {
+ plugin.str= auth_str.str= "";
+ pwtext.str= NULL;
+ plugin.length= auth_str.length= pwtext.length= 0;
+ }
+};
struct AUTHID
{
@@ -243,12 +254,10 @@ struct AUTHID
struct LEX_USER: public AUTHID
{
- LEX_CSTRING plugin, auth, pwtext;
- void reset_auth()
+ USER_AUTH *auth;
+ bool has_auth()
{
- pwtext.length= plugin.length= auth.length= 0;
- pwtext.str= 0;
- plugin.str= auth.str= "";
+ return auth && (auth->plugin.length || auth->auth_str.length || auth->pwtext.length);
}
};