|
The code in Item_bool_func::get_mm_leaf() and stored_field_cmp_to_item() has tests for Field::type_handler(), Field::cmp_type(), Field::type().
This is not friendly to pluggable data types.
Under terms of this task we'll split the code into new virtual methods with approximately these prototypes:
virtual SEL_ARG *Field::get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
|
const Item_bool_func *cond,
|
int op, Item *value);
|
virtual int Type_handler::stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;
|
and move data-type specific pieces of Item_bool_func::get_mm_leaf() and stored_field_cmp_to_item() into virtual implementations of the new methods.
With this approach, pluggable data types will be able to implement their own methods to control the range optimizer
|