summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2017-04-21 14:34:24 -0700
committerIgor Babaev <igor@askmonty.org>2017-04-21 14:34:24 -0700
commit97fb1f26797828427ad850b0420aaafc74205e71 (patch)
tree14830e1a2890bdfac75f929470dbfe6320a57315 /sql/item_subselect.h
parent26ed68dcaed5f5ca27fce21e7a7512e0523b2605 (diff)
downloadmariadb-git-97fb1f26797828427ad850b0420aaafc74205e71.tar.gz
Fixed bug mdev-10053.
The implementation of the walk method for the class Item_in_subselect was missing. As a result the method never traversed the left operand of any IN subquery predicate. Item_exists_subselect::exists2in_processor() that performs the Exist-To-In transformation calls the walk method to collect info on outer references. As the walk method did not traverse the left operands of the IN subqueries the outer references there were not taken into account and some subqueries that were actually correlated were marked as uncorrelated. It could lead to an attempt of the materialization of such a subquery. Also added a cleanup for some test cases merged from 5.5.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index f457eb92e3e..492a3d7dda5 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -705,6 +705,13 @@ public:
in_strategy= (SUBS_STRATEGY_CHOSEN | strategy);
DBUG_VOID_RETURN;
}
+
+ bool walk(Item_processor processor, bool walk_subquery, uchar *arg)
+ {
+ return left_expr->walk(processor, walk_subquery, arg) ||
+ Item_subselect::walk(processor, walk_subquery, arg);
+ }
+
bool exists2in_processor(uchar *opt_arg __attribute__((unused)))
{
return 0;