summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-03-27 08:42:31 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-03-27 08:42:31 +0200
commit09dd6203016435d2026e8a4177d0dee899b1ce12 (patch)
treeb48fcc1c6cd36ec01328fb0ba0d12e554c4467f3
parent902ace096816697ee5d5ac06bd5caea67b624c40 (diff)
downloadmariadb-git-10.3-table-on.tar.gz
Walking throuch query tables ON expression added.10.3-table-on
-rw-r--r--sql/item_subselect.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index a8051ccd469..68f07c10fb7 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -673,11 +673,17 @@ bool Item_subselect::walk(Item_processor processor, bool walk_subquery,
if (lex->where && (lex->where)->walk(processor, walk_subquery, argument))
return 1;
+ for (TABLE_LIST *table= lex->table_list.first;
+ table;
+ table= table->next_local)
+ {
+ if (table->on_expr)
+ table->on_expr->walk(processor, walk_subquery, argument);
+ return 1;
+ }
if (lex->having && (lex->having)->walk(processor, walk_subquery,
argument))
return 1;
- /* TODO: why does this walk WHERE/HAVING but not ON expressions of outer joins? */
-
while ((item=li++))
{
if (item->walk(processor, walk_subquery, argument))