• unknown's avatar
    Fix for bug #25301: Non-zero dates with year 0000 are invalid · 34d20085
    unknown authored
    The 0000 year is valid.
    The ISO standard for "Representation of dates and times" says:
    "Calendar years are numbered in ascending order according to the 
    Gregorian calendar by values in the range [0000] to [9999]."
    
    Reverted fix for 21789: DATETIME with 0000-00-00 11:22:33 should be invalid, but is accepted
    as it's not a bug.
    
    Fix for 19370: DateTime datatype in MySQL has two bugs in it
    will be reverted during 4.1 -> 5.0 merging as it was pushed to the 
    5.0 tree.
    
    
    mysql-test/r/date_formats.result:
      Fix for bug #25301: Non-zero dates with year 0000 are invalid
        - reverted fix for bug #21789: DATETIME with 0000-00-00 11:22:33 should be invalid, but is accepted
    sql-common/my_time.c:
      Fix for bug #25301: Non-zero dates with year 0000 are invalid
        - reverted fix for bug #21789: DATETIME with 0000-00-00 11:22:33 should be invalid, but is accepted
    34d20085
my_time.c 30.5 KB