diff options
author | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-08-20 17:42:49 +0300 |
---|---|---|
committer | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-08-20 17:42:49 +0300 |
commit | 0de3c423cc51d362c3a9b4dc8fa90d549ce0754e (patch) | |
tree | 58beb48e0a76f5b35bbf78bdc1712fb948f26dfb /sql/item_cmpfunc.h | |
parent | 862a97749d5a36218ba4d55c26eef30cd7b2e3cb (diff) | |
download | mariadb-git-0de3c423cc51d362c3a9b4dc8fa90d549ce0754e.tar.gz |
MDEV-16765: Missing rows with pushdown condition defined with CASE using Item_cond
The bug appears because of the wrong pushdown into the WHERE clause of the
materialized derived table/view work. For the excl_dep_on_grouping_fields()
method that checks if the condition can be pushed into the WHERE clause
the case when Item_cond is used is missing. For Item_cond elements this
method always returns positive result (that condition can be pushed).
So this condition is pushed even if is shouldn't be pushed.
To fix it new Item_cond::excl_dep_on_grouping_fields() method is added.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 41a51ee8d12..59ac5f56fe1 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -2224,6 +2224,7 @@ public: Item_transformer transformer, uchar *arg_t); bool eval_not_null_tables(void *opt_arg); Item *build_clone(THD *thd, MEM_ROOT *mem_root); + bool excl_dep_on_grouping_fields(st_select_lex *sel); }; template <template<class> class LI, class T> class Item_equal_iterator; |