Bug #28568 between() function not working correctly for timestamp fields
Submitted: 21 May 2007 17:02 Modified: 22 Jun 2007 7:05
Reporter: Daniel Ahern Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Data Types Severity:S2 (Serious)
Version:5.0.24 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[21 May 2007 17:02] Daniel Ahern
Description:
The between() function does not work correctly for timestamp fields if the date-range is too large. 

How to repeat:
create table myDates(theDate TIMESTAMP NOT NULL);
insert into myDates select '2001-05-05 ';

#returns empty set!!!
select * from myDates where theDate between '2001-01-01' and '2038-01-01'; 	

#returns one row, as expected 
select * from myDates where theDate >=  '2001-01-01' and theDate<='2038-01-01';	

#NOTE: 
#this statement returns one row; size of date-range is apparently important
select * from myDates where theDate between '2001-01-01' and '2037-01-01'
[22 May 2007 7:05] Sveta Smirnova
Thank you for the report.

But version 5.0.24 is quite old. Additionally I can not repeat described issue with current sources. Please upgrade to current 5.0.41 version, try with it and say us result.
[22 Jun 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".