summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-10-21 13:47:17 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-10-24 12:47:57 +0200
commite00ea301efd9e02f89341dfec3a5e0e751213ed8 (patch)
treee938f7e6ed5808e47023b2ee330394efef9404ec /sql/item.cc
parent28d6f6a514366d0358a7215dc7ef202e2b758c10 (diff)
downloadmariadb-git-e00ea301efd9e02f89341dfec3a5e0e751213ed8.tar.gz
MDEV-16549 Server crashes in Item_field::fix_fields on query with view and subquery, Assertion `context' failed, Assertion `field' failed
Add one-table-resolve context for items created with an aim of switching to temporary table because then it can be cloned in push-down-condition.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 8b127cf2626..012dcebdaee 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -10753,6 +10753,20 @@ void view_error_processor(THD *thd, void *data)
((TABLE_LIST *)data)->hide_view_error(thd);
}
+/**
+ Name resolution context with resolution in only one table
+*/
+
+Name_resolution_context::Name_resolution_context(TABLE_LIST *table):
+ outer_context(0), table_list(0), select_lex(0),
+ error_processor_data(0),
+ security_ctx(0)
+{
+ resolve_in_select_list= FALSE;
+ error_processor= &dummy_error_processor;
+ // resolve only in this table
+ first_name_resolution_table= last_name_resolution_table= table;
+}
st_select_lex *Item_ident::get_depended_from() const
{