• tnurnberg@mysql.com's avatar
    Bug#18997: DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value · d1311e1a
    tnurnberg@mysql.com authored
    if input year for date_add() / date_sub() with INTERVAL is low enough for
    calc_daynr() to possibly return incorrect results (calc_daynr() has no information
    on whether the year is low because it was a two-digit year ('77) or because it
    was a really low four-digit year (0077) and will indiscriminately try to turn the
    value into a four-digit year by adding 1900 or 2000 respectively), the functions
    will now throw NULL.
    d1311e1a
func_time.test 23.2 KB