Date with value '0000-00-00' causing problem in specific mydbr version?

(3 posts) (2 voices)
  1. shem, Member

    I have a mysql database table with a nullable DATE column for which some of the values are '0000-00-00'.
    We have two servers.

    On the server with version myDBR 7.1.0 (build 5233) it is causing a problem when selecting all data from that table.

    The error message is:
    Incorrect date value: '0000-00-00' for column 'title_lien_released_date' at row 60

    On the server with version myDBR 7.0.0 (build 5212) it does not throw that error.
    Do I need to change all the rows with value '0000-00-00' to NULL?

    And is this a new check put into version 7.1.0 (build 5233) which means I better fix it before we do a mydbr update on that server?

  2. myDBR Team, Key Master

    The '0000-00-00' date is a legacy "zero" date in MySQL. Whether it is accepted depends on the server's SQL mode. The best practice is to use NULL for missing or unknown dates instead.

    --
    myDBR Team

  3. shem, Member

    Thank you. it was caused by the 'NO_ZERO_DATE' mode


Reply

You must log in to post.