• Alexander Barkov's avatar
    MDEV-8865 Wrong field type or metadata for COALESCE(signed_int_column, unsigned_int_column) · cc9cfeca
    Alexander Barkov authored
    Item_func_hybrid_field_type did not return correct field_type(), cmp_type()
    and result_type() in some cases, because cached_result_type and
    cached_field_type were set in independent pieces of the code and
    did not properly match to each other.
    Fix:
    - Removing Item_func_hybrid_result_type
    - Deriving Item_func_hybrid_field_type directly from Item_func
    - Introducing a new class Type_handler which guarantees that
      field_type(), cmp_type() and result_type() are always properly synchronized
      and using the new class in Item_func_hybrid_field_type.
    cc9cfeca
item_func.h 63.9 KB