[MDEV-2906] LP:750117 - Bogus warning (data corruption?) with aggregate and datetime column in 5.1-micro Created: 2011-04-04  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: Critical
Reporter: Philip Stoev (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug750117.xml    

 Description   

Not repeatable with mysql-5.1. The following query:

SELECT MIN( f1 ) FROM t1 WHERE f1 >= '2006-05-25 07:00:20' AND f1 BETWEEN '2003-11-23 10:00:09' AND '2010-01-01 01:01:01' AND f1 > '2001-01-01 01:01:01' ;

returns the following warning:

Warning 1292 Incorrect datetime value: '72025063209000000' for column 'f1' at row 1

The warning goes away if MIN() is removed and if the >= is replaced by >

test case:

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( f1 datetime, KEY (f1) );
INSERT INTO t1 VALUES ('2000-03-09 15:56:59'),('2000-05-05 23:24:28'),('2000-06-13 13:12:06');
SELECT MIN( f1 ) FROM t1 WHERE f1 >= '2006-05-25 07:00:20' AND f1 BETWEEN '2003-11-23 10:00:09' AND '2010-01-01 01:01:01' AND f1 > '2001-01-01 01:01:01' ;



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

Launchpad bug id: 750117

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