mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
post-merge fixes for WL#1972
sql/item.cc: post-merge fixes sql/sql_select.cc: post-merge fixes
This commit is contained in:
parent
10e868bb5e
commit
7ecaf25656
2 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue