Commit 9fce9428 authored by Roman Nozdrin's avatar Roman Nozdrin

MDEV-19831 find_select_handler() now tries its best to find a

handlerton that is able to processes the whole query. For that it
traverses tables from subqueries.

Select_handler now cleans up temporary table structures on dctor call.
parent efb8485d
......@@ -45,6 +45,8 @@ Pushdown_select::Pushdown_select(SELECT_LEX *sel, select_handler *h)
Pushdown_select::~Pushdown_select()
{
if (handler->table)
free_tmp_table(handler->thd, handler->table);
delete handler;
select->select_h= NULL;
}
......
......@@ -28526,7 +28526,7 @@ select_handler *SELECT_LEX::find_select_handler(THD *thd)
return 0;
if (master_unit()->outer_select())
return 0;
for (TABLE_LIST *tbl= join->tables_list; tbl; tbl= tbl->next_local)
for (TABLE_LIST *tbl= join->tables_list; tbl; tbl= tbl->next_global)
{
if (!tbl->table)
continue;
......
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