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