1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-7950 Item_func::type() takes 0.26% in OLTP RO

Step 2c:

After discussion with Igor, it appeared that Item_field and Item_ref
could not appear in this context in the old function build_equal_item_for_cond:

  else if (cond->type() == Item::FUNC_ITEM ||
           cond->real_item()->type() == Item::FIELD_ITEM)

The part of the condition checking for Item_field::FIELD_ITEM was a dead code.
- Moving implementation of Item_ident_or_func_or_sum::build_equal_items()
to Item_func::build_equal_items()
- Restoring deriving of Item_ident and Item_sum_or_func from Item_result_field.
  Removing Item_ident_or_func_or_sum.
This commit is contained in:
Alexander Barkov
2015-05-04 18:12:31 +04:00
parent 53382ac128
commit 462bca365a
4 changed files with 37 additions and 30 deletions

View File

@ -12893,9 +12893,9 @@ COND *Item_cond::build_equal_items(THD *thd,
}
COND *Item_ident_or_func_or_sum::build_equal_items(THD *thd,
COND_EQUAL *inherited,
bool link_item_fields)
COND *Item_func::build_equal_items(THD *thd,
COND_EQUAL *inherited,
bool link_item_fields)
{
COND_EQUAL cond_equal;
cond_equal.upper_levels= inherited;