• Olav Sandstaa's avatar
    Backporting of jorgen.loland@sun.com-20100618093212-lifp1psig3hbj6jj · b7166f33
    Olav Sandstaa authored
    from mysql-next-mr-opt-backporting.
    
    Bug#54515: Crash in opt_range.cc::get_best_group_min_max on 
               SELECT from VIEW with GROUP BY
          
    When handling the grouping items in get_best_group_min_max, the
    items need to be of type Item_field. In this bug, an ASSERT 
    triggered because the item used for grouping was an 
    Item_direct_view_ref (i.e., the group column is from a view). 
    The fix is to get the real_item since Item_ref* pointing to 
    Item_field is ok.
    b7166f33
select.result 141 KB