Bogus warning printed for certain expressions in 5.1-micro

Bug #731264 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Low
Sergei Golubchik

Bug Description

When inserting invalid values into a DATE column, some subsequent SELECTs may print the following warning:

Warning 1292 Incorrect date value: '0000-00-00 00:00:00.000001' for column 'f1' at row 1

even though no such value is present in the table.

Test case:

CREATE TABLE t1 (f1 DATE NOT NULL, KEY (f1));

INSERT INTO t1 VALUES (2006),('02:55:59');

SELECT f1 FROM t1 FORCE KEY (f1) WHERE f1 NOT IN ( '2001-05-09' , STR_TO_DATE (CURDATE(), 'bogus') );

SHOW WARNINGS;

Related branches

Changed in maria:
milestone: none → 5.3
assignee: nobody → Sergei (sergii)
Revision history for this message
Sergei Golubchik (sergii) wrote :

It's a side effect of MySQL bug.
I've reported it as http://bugs.mysql.com/bug.php?id=60400

Changed in maria:
status: New → Confirmed
importance: Undecided → Low
Changed in maria:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.