Commit 88cc6db0 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-13453: Executing a query via CTE requires more permissions than the query itself

Fix of nondebuging version issue
parent 5e7435c4
......@@ -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=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment