diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-06-26 10:58:51 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-06-26 10:58:51 +0400 |
commit | a4b0063d7b1078a538e16a82132d4b696fa1a3de (patch) | |
tree | 1f8396d46d95fcd100994413eb92b88e5a6c29a5 /sql/item_cmpfunc.h | |
parent | 4a7afdde868bdfaf012e262eba48d4f519787420 (diff) | |
download | mariadb-git-a4b0063d7b1078a538e16a82132d4b696fa1a3de.tar.gz |
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.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index c9b6b30f5b1..6e5385829a2 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -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; } |