• Mattias Jonsson's avatar
    Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) · 3b756a01
    Mattias Jonsson authored
    There were a problem since pruning uses the field
    for comparison (while evaluate_join_record uses longlong),
    resulting in pruning failures when comparing DATE to DATETIME.
    
    Fix was to always comparing DATE vs DATETIME as DATETIME,
    by adding ' 00:00:00' to the DATE string.
    
    And adding optimization for comparing with 23:59:59, so that
    DATETIME_col > '2001-02-03 23:59:59' ->
    TO_DAYS(DATETIME_col) > TO_DAYS('2001-02-03 23:59:59') instead
    of '>='.
    3b756a01
my_time.c 38.1 KB