Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1):
- Item_param (it still can change its Item::type() when the exact value is bound, but does not really need Item::fixed)
Items that need Item::fixed are limited only to (list#2):
Under terms of this task we'll create a common parent Item_fixed_hybrid, move items from list#2 into it, and introduce a virtual method Item::is_fixed() as a replacement for the member Item::fixed.
The top level Item::is_fixed() will return true by default, which will cover list#1.
- Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types.
- Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after
- Preparation to
MDEV-14630, to make its patch easier.
Additionally, at once we'll collect all literals under a new class Item_literal:
They now have some duplicate code. Also, a separate pointer type Item_literal* will be useful for the data type API.