summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorGalina Shalygina <galina.shalygina@mariadb.com>2019-02-19 01:05:56 +0300
committerGalina Shalygina <galina.shalygina@mariadb.com>2019-02-19 01:05:56 +0300
commit97419304900c5ef4ee228c1c41efe0c38f26882c (patch)
treea30f14eef9fbad3e5fc8926c7dd25be39f829e42 /sql/item_cmpfunc.cc
parentd25af33116edfc9ea91324e816ea783013127bba (diff)
downloadmariadb-git-97419304900c5ef4ee228c1c41efe0c38f26882c.tar.gz
MDEV-18636 The test case for bug mdev-16765 crashes the server
in the tree bb-10.4-mdev7486 The crash was caused because of the similar problem as in mdev-16765: Item_cond::excl_dep_on_group_fields_for_having_pushdown() was missing.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 743da0d37dd..b4ff4ab3fe0 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -5222,6 +5222,22 @@ bool Item_cond::excl_dep_on_grouping_fields(st_select_lex *sel)
}
+bool
+Item_cond::excl_dep_on_group_fields_for_having_pushdown(st_select_lex *sel)
+{
+ if (has_rand_bit())
+ return false;
+ List_iterator_fast<Item> li(list);
+ Item *item;
+ while ((item= li++))
+ {
+ if (!item->excl_dep_on_group_fields_for_having_pushdown(sel))
+ return false;
+ }
+ return true;
+}
+
+
void Item_cond_and::mark_as_condition_AND_part(TABLE_LIST *embedding)
{
List_iterator<Item> li(list);