resolve_const_item() is not friendly to pluggable data types, as it has:
- A switch on the result of item_cmp_type()
- A call for field_type_for_temporal_comparison()
This is hard-coded for built-in data types only and won't work properly for new data types.
We'll do the following:
- Introduce a new method in Type_handler:
- Split the code in resolve_const_item() into virtual implementations of the proper type handler implementations
- Replace item_cmp_type() to Type_handler_hybrid_field_type::aggregate_for_comparison()
- Remove Item::field_type_for_temporal_comparison(), as it won't be used any more in the server code.