• evgen@moonbone.local's avatar
    Fix bug#12266 GROUP BY DATE(LEFT(column,8)) returns result strings with reduced · 697836c7
    evgen@moonbone.local authored
    length.
    
    When temporary field created for DATE(LEFT(column,8)) expression, max_length
    value is taken from Item_date_typecast, and it is getting it from underlaid
    Item_func_left and it's max_length is 8 in given expression. And all this
    results in stripping last 2 digits.
    
    To Item_date_typecast class added its own fix_length_and_dec() function 
    that sets max_length value to 10, which is proper for DATE field.
    697836c7
item_timefunc.h 23.5 KB