summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-02-23 00:56:14 +0100
committerSergei Golubchik <serg@mariadb.org>2021-02-23 09:25:57 +0100
commite841957416e9287d1e9b2e32c952d6d0c1a2e2ed (patch)
tree7363161fe48edbecbd562f36280ce3980835f9c2 /sql/item_subselect.cc
parent34fcd726a6d5ee6e41b48b5946df801cb079afc1 (diff)
parent640f42311a72fa82bf7117c2791fc47ceb420361 (diff)
downloadmariadb-git-e841957416e9287d1e9b2e32c952d6d0c1a2e2ed.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc28
1 files changed, 26 insertions, 2 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index e2058475d0e..ad6dba01ad6 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -276,7 +276,11 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref)
{
if (sl->tvc)
{
- wrap_tvc_into_select(thd, sl);
+ if (!(sl= wrap_tvc_into_select(thd, sl)))
+ {
+ res= TRUE;
+ goto end;
+ }
}
}
@@ -380,7 +384,7 @@ bool Item_subselect::mark_as_eliminated_processor(void *arg)
bool Item_subselect::eliminate_subselect_processor(void *arg)
{
unit->item= NULL;
- unit->exclude_from_tree();
+ unit->exclude();
eliminated= TRUE;
return FALSE;
}
@@ -449,6 +453,26 @@ bool Item_subselect::mark_as_dependent(THD *thd, st_select_lex *select,
/*
+ @brief
+ Update the table bitmaps for the outer references used within a subquery
+*/
+
+bool Item_subselect::update_table_bitmaps_processor(void *arg)
+{
+ List_iterator<Ref_to_outside> it(upper_refs);
+ Ref_to_outside *upper;
+
+ while ((upper= it++))
+ {
+ if (upper->item &&
+ upper->item->walk(&Item::update_table_bitmaps_processor, FALSE, arg))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+/*
Adjust attributes after our parent select has been merged into grandparent
DESCRIPTION