diff options
author | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-05-06 21:51:22 +0200 |
---|---|---|
committer | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-05-06 21:51:22 +0200 |
commit | 5c580d74871a17d735c6a7594e667e7078263565 (patch) | |
tree | f615cbe54efdd5e4207f71e89340633b4e85372f | |
parent | bbab52a2b5579faad252704f90621aab34e01101 (diff) | |
download | mariadb-git-5c580d74871a17d735c6a7594e667e7078263565.tar.gz |
Post merge changesbb-10.3-mdev12387
-rw-r--r-- | sql/item.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index c36744108df..c3505556d0c 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -7704,6 +7704,7 @@ Item *Item::build_pushable_cond(THD *thd, return 0; List_iterator<Item> li(*((Item_cond*) this)->argument_list()); Item *item; + bool is_fix_needed= false; while ((item=li++)) { @@ -7718,9 +7719,16 @@ Item *Item::build_pushable_cond(THD *thd, return 0; if (!fix) continue; + + if (fix->type() == Item::COND_ITEM && + ((Item_cond*) fix)->functype() == Item_func::COND_AND_FUNC) + is_fix_needed= true; + if (new_cond->argument_list()->push_back(fix, thd->mem_root)) return 0; } + if (is_fix_needed) + new_cond->fix_fields(thd, 0); switch (new_cond->argument_list()->elements) { |