summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorOleg Smirnov <olernov@gmail.com>2023-01-12 13:18:33 +0700
committerOleg Smirnov <olernov@gmail.com>2023-01-20 13:47:36 +0700
commitafb5deb9db44b52bd86512a8829a28ed52adcd0d (patch)
tree0cf8aef02b32b3ad7910f5c49cd50c480ee69a18 /sql/item_cmpfunc.h
parentc256998b6e76ccb8f3237b13b8dcb7d60d12736d (diff)
downloadmariadb-git-afb5deb9db44b52bd86512a8829a28ed52adcd0d.tar.gz
MDEV-29294 Assertion `functype() == ((Item_cond *) new_item)->functype()' failed in Item_cond::remove_eq_conds on SELECT
Item_singlerow_subselect may be converted to Item_cond during optimization. So there is a possibility of constructing nested Item_cond_and or Item_cond_or which is not allowed (such conditions must be flattened). This commit checks if such kind of optimization has been applied and flattens the condition if needed
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 01834fe06d7..0641213c7c9 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -3046,6 +3046,9 @@ public:
Item *build_clone(THD *thd);
bool excl_dep_on_table(table_map tab_map);
bool excl_dep_on_grouping_fields(st_select_lex *sel);
+
+private:
+ void merge_sub_condition(List_iterator<Item>& li);
};
template <template<class> class LI, class T> class Item_equal_iterator;