Commit 7ecaf256 authored by unknown's avatar unknown

post-merge fixes for WL#1972


sql/item.cc:
  post-merge fixes
sql/sql_select.cc:
  post-merge fixes
parent 10e868bb
......@@ -1911,8 +1911,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **reference)
/* Should have been checked in resolve_ref_in_select_and_group(). */
DBUG_ASSERT(*ref && (*ref)->fixed);
Item_ref *rf= new Item_ref(last->ref_pointer_array + counter,
(char *)table_name, (char *)field_name);
Item_ref *rf= new Item_ref(ref, (char *)table_name, (char *)field_name);
if (!rf)
return TRUE;
thd->change_item_tree(reference, rf);
......@@ -2864,7 +2863,7 @@ bool Item_ref::fix_fields(THD *thd, TABLE_LIST *tables, Item **reference)
if (from_field != view_ref_found)
{
Item_field* fld;
if (!(fld= new Item_field(tmp)))
if (!(fld= new Item_field(from_field)))
return TRUE;
thd->change_item_tree(reference, fld);
mark_as_dependent(thd, last, thd->lex->current_select, fld);
......
......@@ -11288,8 +11288,8 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables,
thd->is_fatal_error))
return 1; // Wrong field
uint el= all_fields.elements;
all_fields.push_front(it); // Add new field to field list
ref_pointer_array[el]= it;
all_fields.push_front(order_item); // Add new field to field list
ref_pointer_array[el]= order_item;
order->item= ref_pointer_array + el;
return 0;
}
......
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