mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Make marking/testing of top level item uniform
There where several different implementations of is_top_level_item(), with different variable names and tests. In some cases the code used 'is_top_level_item()' as a test, in other cases it accessed the variable directrly. This patch makes all usage of 'top_level_item' uniform. The new implementation stores the 'is_tol_level_item()' flag as part of base_flags. This saves 7 bytes in all items that previously stored the flag in it's own bool. I had to keep 'top_level_item()' virtual to ensure that Item_bool_const item's will not be updated. 'is_top_level_item()' is not virtual anymore.
This commit is contained in:
@@ -16362,9 +16362,9 @@ static void update_const_equal_items(THD *thd, COND *cond, JOIN_TAB *tab,
|
||||
Item *item;
|
||||
while ((item= li++))
|
||||
update_const_equal_items(thd, item, tab,
|
||||
(((Item_cond*) cond)->top_level() &&
|
||||
((Item_cond*) cond)->functype() ==
|
||||
Item_func::COND_AND_FUNC));
|
||||
cond->is_top_level_item() &&
|
||||
((Item_cond*) cond)->functype() ==
|
||||
Item_func::COND_AND_FUNC);
|
||||
}
|
||||
else if (cond->type() == Item::FUNC_ITEM &&
|
||||
((Item_func*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
|
||||
|
Reference in New Issue
Block a user