Bug#14700180 CRASH IN COPY_FUNCS

This is a backport of the fix for
Bug#13966809 CRASH IN COPY_FUNCS WHEN GROUPING BY OUTER QUERY BLOB FIELD IN SUBQUERY
This commit is contained in:
Tor Didriksen 2013-04-02 16:05:10 +02:00
parent 68624a3160
commit b432e3da11

View file

@ -9717,7 +9717,7 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
if (new_field)
new_field->init(table);
if (copy_func && item->is_result_field())
if (copy_func && item->real_item()->is_result_field())
*((*copy_func)++) = item; // Save for copy_funcs
if (modify_item)
item->set_result_field(new_field);