Hi Sergey, Can you please review the "step 2" part of MDEV-7950? This is rather a mechanical cut-and-paste change. It does the following things: 1. Removes the function build_equal_items_for_cond() and introduces a new method Item::build_equal_items() instead, with specific implementations in the following Items: Item (the default implementation) Item_ident_or_func_or_sum Item_cond Item_cond_and 2. Adds a new abstract class Item_ident_or_func_or_sum, a common parent for Item_ident and Item_func_or_sum, as they have exactly the same build_equal_items(). 3. Renames Item_cond_and::cond_equal to Item_cond_and::m_cond_equal, to avoid confusion between the member and local variables named "cond_equal". The main purpose of this patch is to prepare to the next step in MDEV-7950. But it already improves performance per se: it gets rid of some virtual calls: - The former call for "((Item_cond*) cond)->functype()" is not needed any more, because Item_cond and Item_cond_and now have different implementations of the method build_equal_items(). - This condition: "else if (cond->type() == Item::FUNC_ITEM || cond->real_item()->type() == Item::FIELD_ITEM)" (which used to cover Item_func, Item_ident and Item_ref) consisted of three virtual calls. It's now replaced by a single virtual call for Item_ident_or_func_or_sum::build_equal_items(), which covers all three item types. Thanks.