diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-02-16 14:56:59 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-02-16 14:56:59 +0100 |
commit | e0072fadcb00edae74e748aee3148075b9cddae2 (patch) | |
tree | 625d5c0869cfbb322a2b4cdaab453e17fd5d31bf /sql/sql_acl.cc | |
parent | 1146e98b3af3e2b15df0598a860f4571663a98d0 (diff) | |
parent | ae7989ca2059869f81c837509e5ff554f7f63562 (diff) | |
download | mariadb-git-10.6-halfmerge.tar.gz |
Merge branch 'bb-10.5-release' into bb-10.6-release10.6-halfmerge
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index aed0ad02e4d..2e1b74bb3ce 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3285,6 +3285,12 @@ end: int acl_check_setrole(THD *thd, const char *rolename, privilege_t *access) { + if (!initialized) + { + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables"); + return 1; + } + return check_user_can_set_role(thd, thd->security_ctx->priv_user, thd->security_ctx->host, thd->security_ctx->ip, rolename, access); } |