MDEV-17411 Wrong WHERE optimization with simple CASE and searched CASE

This commit is contained in:
Alexander Barkov 2018-10-11 13:39:53 +04:00
commit 4de0d920be
7 changed files with 66 additions and 9 deletions

View file

@ -1813,10 +1813,7 @@ bool Item_func_opt_neg::eq(const Item *item, bool binary_cmp) const
return 0;
if (negated != ((Item_func_opt_neg *) item_func)->negated)
return 0;
for (uint i=0; i < arg_count ; i++)
if (!args[i]->eq(item_func->arguments()[i], binary_cmp))
return 0;
return 1;
return Item_args::eq(item_func, binary_cmp);
}