Commit 3bf9c7ed authored by gshchepa/uchum@host.loc's avatar gshchepa/uchum@host.loc
Browse files

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
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -360,10 +360,10 @@ fix_inner_refs(THD *thd, List<Item> &all_fields, SELECT_LEX *select,
      }
    }
    new_ref= direct_ref ?
              new Item_direct_ref(ref->context, item_ref, ref->field_name,
                          ref->table_name, ref->alias_name_used) :
              new Item_ref(ref->context, item_ref, ref->field_name,
                          ref->table_name, ref->alias_name_used);
              new Item_direct_ref(ref->context, item_ref, ref->table_name,
                          ref->field_name, ref->alias_name_used) :
              new Item_ref(ref->context, item_ref, ref->table_name,
                          ref->field_name, ref->alias_name_used);
    if (!new_ref)
      return TRUE;
    ref->outer_ref= new_ref;