-
unknown 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. mysql-test/t/view.test: Added test for bug#17726: Not checked empty list caused endless loop mysql-test/r/view.result: Added test for bug#17726: Not checked empty list caused endless loop sql/item_cmpfunc.cc: Fixed bug#17726: Not checked empty list caused endless loop To the Item_cond::fix_fields() function added check that ensures that list being replaced with isn't empty.
cc7a75e6