diff options
author | Galina Shalygina <galina.shalygina@mariadb.com> | 2019-03-23 15:28:22 +0300 |
---|---|---|
committer | Galina Shalygina <galina.shalygina@mariadb.com> | 2019-04-04 18:06:56 +0300 |
commit | ae15f91f227015b3e1ad3f566db9396232cf0a3f (patch) | |
tree | 28fa79f3fe624576ef3351f897b77558e7207330 /sql/sql_select.h | |
parent | 3a3d5ba2356b85626d34d6a65e4d8e8e6205b60d (diff) | |
download | mariadb-git-ae15f91f227015b3e1ad3f566db9396232cf0a3f.tar.gz |
MDEV-18769 Assertion `fixed == 1' failed in Item_cond_or::val_int
This bug is caused by pushdown from HAVING into WHERE.
It appears because condition that is pushed wasn't fixed.
It is also discovered that condition pushdown from HAVING into
WHERE is done wrong. There is no need to build clones for some
conditions that can be pushed. They can be simply moved from HAVING
into WHERE without cloning.
build_pushable_cond_for_having_pushdown(),
remove_pushed_top_conjuncts_for_having() methods are changed.
It is found that there is no transformation made for fields of
pushed condition.
field_transformer_for_having_pushdown transformer is added.
New tests are added. Some comments are changed.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 55ab94186ad..482b4ff9608 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -228,8 +228,7 @@ Item *remove_pushed_top_conjuncts(THD *thd, Item *cond); Item *and_new_conditions_to_optimized_cond(THD *thd, Item *cond, COND_EQUAL **cond_eq, List<Item> &new_conds, - Item::cond_result *cond_value, - bool build_cond_equal); + Item::cond_result *cond_value); #include "sql_explain.h" |