1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext

Conflicts:
	cmake/make_dist.cmake.in
	mysql-test/r/func_json.result
	mysql-test/r/ps.result
	mysql-test/t/func_json.test
	mysql-test/t/ps.test
	sql/item_cmpfunc.h
This commit is contained in:
Monty
2018-01-01 19:39:59 +02:00
161 changed files with 4321 additions and 635 deletions

View File

@ -862,6 +862,22 @@ JOIN::prepare(TABLE_LIST *tables_init,
}
}
/*
After setting up window functions, we may have discovered additional
used tables from the PARTITION BY and ORDER BY list. Update all items
that contain window functions.
*/
if (select_lex->have_window_funcs())
{
List_iterator_fast<Item> it(select_lex->item_list);
Item *item;
while ((item= it++))
{
if (item->with_window_func)
item->update_used_tables();
}
}
With_clause *with_clause=select_lex->get_with_clause();
if (with_clause && with_clause->prepare_unreferenced_elements(thd))
DBUG_RETURN(1);