diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2017-11-15 13:25:55 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2017-11-15 13:25:55 +0100 |
commit | 88cc6db0a48eef6556743979935f2a3725205c57 (patch) | |
tree | d49631a8c2207613bdacf7673c597e0d5ab89dc5 /sql/sql_acl.cc | |
parent | 5e7435c4b01737e106c19e8417a374df313cc344 (diff) | |
download | mariadb-git-88cc6db0a48eef6556743979935f2a3725205c57.tar.gz |
MDEV-13453: Executing a query via CTE requires more permissions than the query itself
Fix of nondebuging version issue
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 74f06e7654d..7f155ec7808 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -7558,7 +7558,8 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables, sctx= t_ref->security_ctx ? t_ref->security_ctx : thd->security_ctx; if (tl->with || - (tl->with= tl->select_lex->find_table_def_in_with_clauses(tl))) + (tl->select_lex && + (tl->with= tl->select_lex->find_table_def_in_with_clauses(tl)))) continue; const ACL_internal_table_access *access= |