MDEV-8256 A part of a ROW comparison is erroneously optimized away

Item_func_eq's created during conversion of a ROW equality to a conjunction
of scalar equalities did not set cmp_context for its arguments properly,
so some of these created Item_func_eq could be later erroneously eliminated.
This commit is contained in:
Alexander Barkov 2015-06-26 10:58:51 +04:00
commit a4b0063d7b
4 changed files with 55 additions and 2 deletions

View file

@ -325,6 +325,14 @@ public:
{
return cmp.set_cmp_func(this, tmp_arg, tmp_arg + 1, true);
}
bool set_cmp_func_and_arg_cmp_context()
{
if (set_cmp_func())
return true;
tmp_arg[0]->cmp_context= tmp_arg[1]->cmp_context=
item_cmp_type(tmp_arg[0]->result_type(), tmp_arg[1]->result_type());
return false;
}
CHARSET_INFO *compare_collation() const
{ return cmp.cmp_collation.collation; }
Arg_comparator *get_comparator() { return &cmp; }