Item_int_func::sargable is permanently set in constructor.
It's only used to implement "virtual bool Item::count_sargable_conds()" for Item_int_func descendants.
There is a little sense to have two things that implement the same thing.
Everything should be done through proper virtual method implementation and its proper inheritance.
Proposed changes about count_sargable_conds():
- Item_int_func should use the default non-optimized derived implementation that comes from Item
- Item_int_func descendants that can really use optimizer (e.g. Item_bool_rowready_func2, Item_func_spatial_rel, Item_func_like) should just implement their own versions. Note, it's important to avoid code duplication here.