• Alexander Barkov's avatar
    MDEV-12559 Split Item::temporal_precision() into virtual methods in Type_handler · ba670edf
    Alexander Barkov authored
    - Adding a new virtual method Type_handler::Item_time_precision()
    - Adding a new virtual method Type_handler::Item_datetime_precision()
    - Removing Item::temporal_precision() and adding Item::time_precision()
      and Item::datetime_precision() instead.
    - Moving Item_func_convert_tz::fix_length_and_dec() from item_timefunc.cc
      to item_timefunc.h. It's only two lines, and we're changing it anyway.
    - Removing Item_temporal_typecast::fix_length_and_dec_generic(),
      moving this code to
      Type_handler::Item_{date|time|datetime}_typecast_fix_length_and_dec().
      This allows to get rid of one more field_type() call.
      Also, in the old reduction, Item_date_typecast::fix_length_and_dec()
      unnecessarily called args[0]->temporal_precision(). The new reduction
      does not call args[0]->datetime_precision(), as DATE does not
      have fractional digits.
    ba670edf
item.h 195 KB