• unknown's avatar
    Fix for BUG#14662: view column in ORDER BY considered ambiguous if SELECT contains · 9a0da055
    unknown authored
    the same column as an aliased and as a non-aliased column.
    
    The problem was that Item_direct_view_ref::eq() was first comparing view columns
    by name, and in this case the name of one of them is different since it is aliased.
    
    
    mysql-test/r/select.result:
      Added test for BUG#14662.
    mysql-test/t/select.test:
      Added test for BUG#14662.
    sql/item.cc:
      Changed the way view column refenreces are compared. Two view columns are
      equal if they resolve to the same result field of a view.
    9a0da055
item.cc 158 KB