Commit 75b4eb5c authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Catch of OOM situation.

parent 72b6d018
...@@ -6426,6 +6426,9 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name, ...@@ -6426,6 +6426,9 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
column reference. See create_view_field() for details. column reference. See create_view_field() for details.
*/ */
item= nj_col->create_item(thd); item= nj_col->create_item(thd);
if (!item)
DBUG_RETURN(NULL);
/* /*
*ref != NULL means that *ref contains the item that we need to *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 replace. If the item was aliased by the user, set the alias to
......
...@@ -5252,6 +5252,8 @@ Item *create_view_field(THD *thd, TABLE_LIST *view, Item **field_ref, ...@@ -5252,6 +5252,8 @@ Item *create_view_field(THD *thd, TABLE_LIST *view, Item **field_ref,
Item *item= new Item_direct_view_ref(&view->view->select_lex.context, Item *item= new Item_direct_view_ref(&view->view->select_lex.context,
field_ref, view->alias, field_ref, view->alias,
name, view); name, view);
if (!item)
return NULL;
/* /*
Force creation of nullable item for the result tmp table for outer joined Force creation of nullable item for the result tmp table for outer joined
views/derived tables. views/derived tables.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment