• sergefp@mysql.com's avatar
    Fix for BUG#10095: {wrong query results because of incorrect constant propagation} · f08287f3
    sergefp@mysql.com authored
    The problem: base_list::remove didn't modify base_list::last when removing 
    the last list element.
    The fix: If we remove the last element, find the element before it (by walking
    from the beginning of the list) and set base_list::last accordingly.
    
    The list gets corrupted in both 4.0 and 4.1. There are no visible problems in 
    current 4.1 because current 4.1 doesn't call where_cond->fix_fields() after 
    constant propagation step.
    f08287f3
select.test 119 KB