summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 23ff906e3cf..1690ec96e65 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -2104,7 +2104,7 @@ bool Item_allany_subselect::transform_into_max_min(JOIN *join)
The swap is needed for expressions of type 'f1 < ALL ( SELECT ....)'
where we want to evaluate the sub query even if f1 would be null.
*/
- subs= func->create_swap(thd, *(optimizer->get_cache()), subs);
+ subs= func->create_swap(thd, expr, subs);
thd->change_item_tree(place, subs);
if (subs->fix_fields(thd, &subs))
DBUG_RETURN(true);