diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-10-02 22:14:21 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-10-02 22:14:21 +0200 |
commit | 900d7bf3604e7ba265f06d96f76a049dc3c4c9af (patch) | |
tree | c447b67842760bdc3ccae31aebb987fee4071842 /sql/item_subselect.cc | |
parent | 2ab52cc0e5c3cc792608a518625a08e6d3734ce4 (diff) | |
parent | 3a2116241b128b811ee2455845ff9710da3115ac (diff) | |
download | mariadb-git-900d7bf3604e7ba265f06d96f76a049dc3c4c9af.tar.gz |
Merge branch '10.5' into 10.6
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index afd060d576a..bc71d8cf159 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -399,50 +399,6 @@ bool Item_subselect::eliminate_subselect_processor(void *arg) } -/** - Adjust the master select of the subquery to be the fake_select which - represents the whole UNION right above the subquery, instead of the - last query of the UNION. - - @param arg pointer to the fake select - - @return - FALSE to force the evaluation of the processor for the subsequent items. -*/ - -bool Item_subselect::set_fake_select_as_master_processor(void *arg) -{ - SELECT_LEX *fake_select= (SELECT_LEX*) arg; - /* - Move the st_select_lex_unit of a subquery from a global ORDER BY clause to - become a direct child of the fake_select of a UNION. In this way the - ORDER BY that is applied to the temporary table that contains the result of - the whole UNION, and all columns in the subquery are resolved against this - table. The transformation is applied only for immediate child subqueries of - a UNION query. - */ - if (unit->outer_select()->master_unit()->fake_select_lex == fake_select) - { - /* - Set the master of the subquery to be the fake select (i.e. the whole - UNION), instead of the last query in the UNION. - */ - fake_select->add_slave(unit); - DBUG_ASSERT(unit->outer_select() == fake_select); - /* Adjust the name resolution context hierarchy accordingly. */ - for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select()) - sl->context.outer_context= &(fake_select->context); - /* - Undo Item_subselect::eliminate_subselect_processor because at that phase - we don't know yet that the ORDER clause will be moved to the fake select. - */ - unit->item= this; - eliminated= FALSE; - } - return FALSE; -} - - bool Item_subselect::mark_as_dependent(THD *thd, st_select_lex *select, Item *item) { |