Commit 47ede926 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-14959: 1 - Allocation in Item_subselect::mark_as_dependent

Fix leack in Item_subselect::mark_as_dependent (allocation
of temporary list in statement memory inctroduced in
f4d55210 )
parent d347b0aa
...@@ -407,11 +407,11 @@ bool Item_subselect::mark_as_dependent(THD *thd, st_select_lex *select, ...@@ -407,11 +407,11 @@ bool Item_subselect::mark_as_dependent(THD *thd, st_select_lex *select,
{ {
is_correlated= TRUE; is_correlated= TRUE;
Ref_to_outside *upper; Ref_to_outside *upper;
if (!(upper= new (thd->stmt_arena->mem_root) Ref_to_outside())) if (!(upper= new (thd->mem_root) Ref_to_outside()))
return TRUE; return TRUE;
upper->select= select; upper->select= select;
upper->item= item; upper->item= item;
if (upper_refs.push_back(upper, thd->stmt_arena->mem_root)) if (upper_refs.push_back(upper, thd->mem_root))
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
......
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