summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 9dfaf82758c..83ab24fc27d 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5345,6 +5345,9 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
column reference. See create_view_field() for details.
*/
item= nj_col->create_item(thd);
+ if (!item)
+ DBUG_RETURN(NULL);
+
/*
*ref != NULL means that *ref contains the item that we need to
replace. If the item was aliased by the user, set the alias to