diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-02-02 17:55:53 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-02-02 17:55:53 +0100 |
commit | 0f810b58faf487c7cd59f2ee520f62deb0f712eb (patch) | |
tree | dfb52d41ffd83d0dbffb969c091fe190b9457a24 /sql/sql_acl.cc | |
parent | 542d769ea1a22a7a6a87c9fe76ff911a162ade44 (diff) | |
parent | 251b52190070095e4c65ffb0ae545d49330a02b2 (diff) | |
download | mariadb-git-10.4-merge-attempt.tar.gz |
Merge branch 'bb-10.3-release' into bb-10.4-release10.4-merge-attempt
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 cb2757ba48f..e56361bc424 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3159,6 +3159,12 @@ end: int acl_check_setrole(THD *thd, const char *rolename, ulonglong *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); } |