diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-16 11:56:16 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-19 12:33:25 +0200 |
commit | 2fced9e7b643d0c101d0ffde33f51e0a38f7017e (patch) | |
tree | 9b68d45e74a18de4a1d9897dce09fd9ae2189aeb /sql/structs.h | |
parent | 40088bfc7e100294d622ab32a6e7cbcb79c12eab (diff) | |
download | mariadb-git-2fced9e7b643d0c101d0ffde33f51e0a38f7017e.tar.gz |
MDEV-13655: Set role does not properly grant privileges.
When granting a role to another role, DB privileges get propagated. If
the grantee had no previous DB privileges, an extra ACL_DB entry is created to
house those "indirectly received" privileges. If, afterwards, DB
privileges are granted to the grantee directly, we must make sure to not
create a duplicate ACL_DB entry.
Diffstat (limited to 'sql/structs.h')
-rw-r--r-- | sql/structs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/structs.h b/sql/structs.h index ee61b8d3b3a..e141a8d7668 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -191,7 +191,7 @@ typedef int *(*update_var)(THD *, struct st_mysql_show_var *); typedef struct st_lex_user { LEX_STRING user, host, password, plugin, auth; - bool is_role() { return user.str[0] && !host.str[0]; } + bool is_role() const { return user.str[0] && !host.str[0]; } void set_lex_string(LEX_STRING *l, char *buf) { if (is_role()) |