Fixed bug #34830: mixed table and field names in Item_ref

                  and Item_direct_ref constructor calls.

Order of ref->field_name and ref->table_name arguments
is of Item_ref and Item_direct_ref in the fix_inner_refs
function is inverted.
parent 11a27f12
...@@ -360,10 +360,10 @@ fix_inner_refs(THD *thd, List<Item> &all_fields, SELECT_LEX *select, ...@@ -360,10 +360,10 @@ fix_inner_refs(THD *thd, List<Item> &all_fields, SELECT_LEX *select,
} }
} }
new_ref= direct_ref ? new_ref= direct_ref ?
new Item_direct_ref(ref->context, item_ref, ref->field_name, new Item_direct_ref(ref->context, item_ref, ref->table_name,
ref->table_name, ref->alias_name_used) : ref->field_name, ref->alias_name_used) :
new Item_ref(ref->context, item_ref, ref->field_name, new Item_ref(ref->context, item_ref, ref->table_name,
ref->table_name, ref->alias_name_used); ref->field_name, ref->alias_name_used);
if (!new_ref) if (!new_ref)
return TRUE; return TRUE;
ref->outer_ref= new_ref; ref->outer_ref= new_ref;
......
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