I just upgraded my installation from MySQL 5.0.5 to MySQL 5.6.
With MySQL 5.0 I could have an insert query like this:
INSERT INTO mytable (myid, mydate, myname) VALUES (NULL, '', 'John');
But apparently not anymore. Now, if I try, it gives me this error:
#1292 - Incorrect date value: '' for column 'mydate' at row 1
By the way, mydate is defined as mydate date NOT NULL,
And if I change the query to ...
INSERT INTO mytable (myid, mydate, myname) VALUES (NULL, '0000-00-00', 'John');
... or ...
INSERT INTO mytable (myid, mydate, myname) VALUES (NULL, 0, 'John');
... than it succeeds.
Is this behavior controlled by some setting in MySQL? If so, where can I find it? Or will I have to change all my queries? Suggestions?
Thanks.