diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-03-27 08:42:31 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-03-27 08:42:31 +0200 |
commit | 09dd6203016435d2026e8a4177d0dee899b1ce12 (patch) | |
tree | b48fcc1c6cd36ec01328fb0ba0d12e554c4467f3 | |
parent | 902ace096816697ee5d5ac06bd5caea67b624c40 (diff) | |
download | mariadb-git-10.3-table-on.tar.gz |
Walking throuch query tables ON expression added.10.3-table-on
-rw-r--r-- | sql/item_subselect.cc | 10 |
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)) |