Bug #19272 datetime
Submitted: 22 Apr 2006 10:33 Modified: 22 Apr 2006 16:51
Reporter: Ton Graaff Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0.20 OS:Any (ALL)
Assigned to: CPU Architecture:Any

[22 Apr 2006 10:33] Ton Graaff
Description:
I like to see an option to force MYSQL 5.0.20 only to accept correct datetime. I have a checkdate in my website for submitting date and time information, looking at the update query it sends the correct datetime, but for some reason it sometimes comes into mysql datetimefield as 0000-00-00 00:00:00 . It would be nice to have an option that if the server does receive this it gives an error to avoid input of wrong dates.

The problem is it does not happen when the input is done from the website with a normal browser, but only happens if they update it with blackberry PDA. So my checkup is ok but the Blackberry finds a way to go around it somehow.

Even tho when i reproduce the Update query it shows a correct input. 

How to repeat:
No repeating needed, just a option in the datetime field that does not allow zero datetime value.
[22 Apr 2006 16:51] Jim Winstead
You can already configure MySQL 5.0 to not accept invalid dates.

See http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html