Bug #44896 timestamp data type does not cover the range specified in the documentation
Submitted: 15 May 2009 8:39 Modified: 19 May 2009 5:48
Reporter: Oli Sennhauser Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Data Types Severity:S2 (Serious)
Version:5.1.34, 5.0.70 OS:Any
Assigned to: CPU Architecture:Any
Tags: timestamp data type

[15 May 2009 8:39] Oli Sennhauser
Description:
The timestamp data type does not cover the full range which is specified in the MySQL documentation.

How to repeat:
create table test (ts timestamp);

insert into test
values
  ('1969-12-31 23:59:59')
, ('1970-01-01 00:00:00')
, ('1970-01-01 00:00:01') <- Should work
, ('1970-01-01 01:00:00') <- Should work
, ('1970-01-01 01:00:01')
;

show warnings;
+---------+------+---------------------------------------------+
| Level   | Code | Message                                     |
+---------+------+---------------------------------------------+
| Warning | 1264 | Out of range value for column 'ts' at row 1 |
| Warning | 1264 | Out of range value for column 'ts' at row 2 |
| Warning | 1264 | Out of range value for column 'ts' at row 3 | <- Should work
| Warning | 1264 | Out of range value for column 'ts' at row 4 | <- Should work
+---------+------+---------------------------------------------+

select * from test;

The TIMESTAMP data type has a range of '1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC. It has varying properties, depending on the MySQL version and the SQL mode the server is running in. These properties are described later in this section.

http://dev.mysql.com/doc/refman/5.1/en/datetime.html

Suggested fix:
just match the documentation to the data range
[19 May 2009 5:48] Oli Sennhauser
Works correctly, when TIME_ZONE is set correctly.