summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2020-05-12 16:16:05 +0200
committerAnel Husakovic <anel@mariadb.org>2020-05-14 14:52:18 +0200
commit9a792dea7bdba4f3cd80215213c2e83a8b404563 (patch)
tree9cf25e408b97a7594688df4999e9f0aa387f494a /sql/sql_repl.cc
parent31f34b20f3295db7e99877dcfe61b5798a6cfe95 (diff)
downloadmariadb-git-9a792dea7bdba4f3cd80215213c2e83a8b404563.tar.gz
MDEV-22312: Bad error message for SET DEFAULT ROLE when user account is not granted the role
- `SET DEFAULT ROLE xxx [FOR yyy]` should say: "User yyy has not been granted a role xxx" if: - The current user (not the user `yyy` in the FOR clause) can see the role xxx. It can see the role if: * role exists in `mysql.roles_mappings` (traverse the graph), * If the current user has read access on `mysql.user` table - in that case, it can see all roles, granted or not. - Otherwise it should be "Invalid role specification". In other words, it should not be possible to use `SET DEFAULT ROLE` to discover whether a specific role exist or not.
Diffstat (limited to 'sql/sql_repl.cc')
0 files changed, 0 insertions, 0 deletions