[MDEV-3540] LP:731264 - Bogus warning printed for certain expressions in 5.1-micro Created: 2011-03-08  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Philip Stoev (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug731264.xml    

 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;



 Comments   
Comment by Sergei Golubchik [ 2011-03-08 ]

Re: Bogus warning printed for certain expressions in 5.1-micro
It's a side effect of MySQL bug.
I've reported it as http://bugs.mysql.com/bug.php?id=60400

Comment by Rasmus Johansson (Inactive) [ 2011-10-28 ]

Launchpad bug id: 731264

Generated at Thu Feb 08 06:49:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.