-
unknown 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. mysql-test/r/select.result: Testcase for BUG#10095 mysql-test/t/select.test: Testcase for BUG#10095 sql/sql_list.h: Fix for BUG#10095: {wrong query results because of incorrect constant propagation} 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.
53d55034