summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-10-11 13:39:53 +0400
committerAlexander Barkov <bar@mariadb.com>2018-10-11 13:39:53 +0400
commit4de0d920bede330ddf7790d0aee4bf90a00122ae (patch)
tree96b05f6cbb46e867b014aff4cc8583f93579ba6f /sql/item_func.cc
parent30629e196d8f40ac7a769730c7641286aa2cfd44 (diff)
downloadmariadb-git-4de0d920bede330ddf7790d0aee4bf90a00122ae.tar.gz
MDEV-17411 Wrong WHERE optimization with simple CASE and searched CASE
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 3dcfe4fbce8..c5ac97f2905 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -647,10 +647,7 @@ bool Item_func::eq(const Item *item, bool binary_cmp) const
(func_type == Item_func::FUNC_SP &&
my_strcasecmp(system_charset_info, func_name(), item_func->func_name())))
return 0;
- for (uint i=0; i < arg_count ; i++)
- if (!args[i]->eq(item_func->args[i], binary_cmp))
- return 0;
- return 1;
+ return Item_args::eq(item_func, binary_cmp);
}