• evgen@moonbone.local's avatar
    Fixed bug#17726: Not checked empty list caused endless loop · 62a266f1
    evgen@moonbone.local authored
    When the Item_cond::fix_fields() function reduces cond tree, it in loop
    scans it's own list and when it founds Item_cond with same function (AND
    or OR) it does next things: 1) replaces that item with item's list. 2)
    empties item's list. Due to this operation is done twice - for update and
    for view, at the update phase cond's list of lower view is already empty.
    Empty list returns ref to itself, thus making endless loop by replacing
    list with itself, emptying, replacing again and so on. This results in
    server hung up.
    
    To the Item_cond::fix_fields() function added check that ensures that
    list being replaced with isn't empty.
    62a266f1
view.result 75.8 KB