• Alexander Barkov's avatar
    Merging MDEV-4635 from 5.3. · 7cc77106
    Alexander Barkov authored
    Also, fixing a bug in STR_TO_DATE(). It erroneously returned
    error in strict mode for dates like '0000-01-01'
    (zero year, but non-zero month and day).
    
    According to the manual:
    - NO_ZERO_DATE disallows 0000-00-00 (all date parts are zeros)
    - NO_ZERO_IN_DATE disallows zero month (YYYY-00-DD) or day (YYYY-MM-00).
    
    0000-01-01 is a valid date, even in strict mode.
    
    
    modified:
      mysql-test/r/func_time.result
      mysql-test/r/strict.result
      mysql-test/t/func_time.test
      mysql-test/t/strict.test
      sql/item_timefunc.cc
      sql/sql_time.h
    pending merges:
      Alexander Barkov 2013-06-17 MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DAT...
    7cc77106
strict.result 62.1 KB