• unknown's avatar
    Bug #32180: DATE_ADD treats datetime numeric argument as DATE instead of DATETIME · 5e9933d7
    unknown authored
    This is a regression from 2007-05-18 when code to zero out the returned struct was
    added to number_to_datetime(); zero for time_type corresponds to MYSQL_TIMESTAMP_DATE.
    We now explicitly set the type we return (MYSQL_TIMESTAMP_DATETIME).
    
    
    mysql-test/r/func_time.result:
      show that DATE_ADD() behaves the same for YYYYMMDDhhmmss given
      as string and as integer.
    mysql-test/t/func_time.test:
      show that DATE_ADD() behaves the same for YYYYMMDDhhmmss given
      as string and as integer.
    sql-common/my_time.c:
      explictly set return type in number_to_datetime()
    5e9933d7
my_time.c 37.6 KB