diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-11 11:25:33 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-11 11:25:33 +0200 |
commit | fd132be117e44318de04973e8bc825651b220792 (patch) | |
tree | a78222eeae060b5a605633a9f603e5e7528f12c3 /sql/item_cmpfunc.cc | |
parent | 7b05fc5cdd6058e91a26836ace54f45f37fa88b5 (diff) | |
parent | a917be3e7f07fc803fb04aba7173081550dcc7db (diff) | |
download | mariadb-git-fd132be117e44318de04973e8bc825651b220792.tar.gz |
Merge branch '10.6' into 10.7
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 034833a0ba2..9123bd96d5e 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -7668,7 +7668,17 @@ bool Item_equal::create_pushable_equalities(THD *thd, if (!eq || equalities->push_back(eq, thd->mem_root)) return true; if (!clone_const) - right_item->set_extraction_flag(MARKER_IMMUTABLE); + { + /* + Also set IMMUTABLE_FL for any sub-items of the right_item. + This is needed to prevent Item::cleanup_excluding_immutables_processor + from peforming cleanup of the sub-items and so creating an item tree + where a fixed item has non-fixed items inside it. + */ + int16 new_flag= MARKER_IMMUTABLE; + right_item->walk(&Item::set_extraction_flag_processor, false, + (void*)&new_flag); + } } while ((item=it++)) |