summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-10-04 13:23:13 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-10-04 13:23:13 +0200
commit55e07d9ade51e9e969f528d903509806142f4d1e (patch)
tree7261b1dc07a0b7a5467e8ec22d676c48ae9324dd /sql/item_subselect.cc
parent0333ddd3ec003225384507f30e65517d99c494b7 (diff)
parent2f70784c2aff3bcf67f89f4d8cd121e8f8c3355f (diff)
downloadmariadb-git-55e07d9ade51e9e969f528d903509806142f4d1e.tar.gz
Merge branch '10.8' into 10.9
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc44
1 files changed, 0 insertions, 44 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 24c4cc505eb..c79735e9a37 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)
{