Commit dd6ad380 authored by Sergei Petrunia's avatar Sergei Petrunia

Code cleanup: merge walk_items_for_table_list with walk_table_functions_for_list

parent 4930f9c9
......@@ -685,6 +685,12 @@ bool Item_subselect::is_expensive()
}
/*
@brief
Apply item processor for all scalar (i.e. Item*) expressions that
occur in the nested join.
*/
static
int walk_items_for_table_list(Item_processor processor,
bool walk_subquery, void *argument,
......@@ -699,6 +705,14 @@ int walk_items_for_table_list(Item_processor processor,
if ((res= table->on_expr->walk(processor, walk_subquery, argument)))
return res;
}
if (Table_function_json_table *tf= table->table_function)
{
if ((res= tf->walk_items(processor, walk_subquery, argument)))
{
return res;
}
}
if (table->nested_join)
{
if ((res= walk_items_for_table_list(processor, walk_subquery, argument,
......@@ -807,10 +821,6 @@ bool Item_subselect::walk(Item_processor processor, bool walk_subquery,
*lex->join_list))
return 1;
if (walk_table_functions_for_list(processor, walk_subquery, argument,
*lex->join_list))
return 1;
while (Item *item= li++)
{
if (item->walk(processor, walk_subquery, argument))
......
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