• unknown's avatar
    Fix for bug#4302 "ambiguos order by when renamed column is identical to another in result" · f9c3cb5f
    unknown authored
    When in find_item_in_list() we are looking for item we should take into account unaliased 
    names of the fields but only if item with such aliased name is not found.
    Also we should ignore aliases when looking for fully specified field.
    
    
    mysql-test/r/order_by.result:
      Fixed wrong (non-standard) test results
      Added test case for bug #4302
      Added tests for other ambiguos and potentially ambigous cases in order by clause
    mysql-test/t/order_by.test:
      Fixed wrong (non-standard) test results
      Added test case for bug #4302
      Added tests for other ambiguos and potentially ambigous cases in order by clause
    sql/sql_select.cc:
      We should ignore only not_found_item errors when searching for item in find_order_in_list() 
      to be able to catch ambiguities.
    f9c3cb5f
order_by.test 17.6 KB