• unknown's avatar
    Fixed bug #25427. · 6fc17dab
    unknown authored
    In the method Item_field::fix_fields we try to resolve the name of
    the field against the names of the aliases that occur in the select
    list. This is done by a call of the function find_item_in_list.
    When this function finds several occurrences of the field name
    it sends an error message to the error queue and returns 0.
    Yet the code did not take into account that find_item_in_list
    could return 0 and tried to dereference the returned value.
    
    
    mysql-test/r/order_by.result:
      Added a test case for bug #25427.
    mysql-test/t/order_by.test:
      Added a test case for bug #25427.
    sql/item.cc:
      Fixed bug #25427.
      In the method Item_field::fix_fields we try to resolve the name of
      the field against the names of the aliases that occur in the select
      list. This is done by a call of the function find_item_in_list.
      When this function finds several occurrences of the field name 
      it sends an error message to the error queue and returns 0.
      Yet the code did not take into account that find_item_in_list
      could return 0 and tried to dereference the returned value.
    6fc17dab
order_by.result 26.7 KB