diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-18 15:04:50 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-19 14:07:55 +0200 |
commit | bf2bdd1a1a112c3bbdf53da7a663a59fafa62c7d (patch) | |
tree | 615e56754c44190551cea0381494b675108b6ae9 /sql/item_cmpfunc.cc | |
parent | 5dba54bfef31d91c082362065cd091086e20ee9a (diff) | |
parent | b7ffccf49b5563d3078359bddf438c9d20674513 (diff) | |
download | mariadb-git-bf2bdd1a1a112c3bbdf53da7a663a59fafa62c7d.tar.gz |
Merge branch '10.8' into 10.9mariadb-10.9.1
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 dbfbc07a600..a53bb2e53b6 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -7663,7 +7663,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++)) |