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