Bug #73097 Supported DATETIME range does not match documentation
Submitted: 24 Jun 2014 17:01 Modified: 1 Jul 2014 14:48
Reporter: Bryan Luoma Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6.19 OS:Linux
Assigned to: Paul DuBois CPU Architecture:Any
Tags: datetime, range

[24 Jun 2014 17:01] Bryan Luoma
Description:
Through some blackbox testing of my product I have noted that after migrating from MySQL 5.1.49 to MySQL 5.6.19 that DATETIME values prior to 1000-01-01 00:00:00.

In practice I am seeing a lower bound of 0000-01-01 00:00:00 from the server.

The current documentation claims:
"The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'."

How to repeat:
create table dfrdt(col1 datetime);
insert into dfrdt values('0000-01-01 00:00:00');
select * from dfrdt;
[27 Jun 2014 10:02] MySQL Verification Team
Hello Brendan,

Thank you for the report.
Verified as described

Thanks,
Umesh
[27 Jun 2014 10:03] MySQL Verification Team
// How to repeat

set sql_mode='TRADITIONAL';
show warnings;
show variables like 'sql_mode';

create database if not exists test;
use test;
drop table if exists dfrdt;
create table dfrdt(col1 datetime);
insert into dfrdt values('0000-01-01 00:00:00');
select * from dfrdt;
[1 Jul 2014 14:48] Paul DuBois
The key phrase is "supported range". It might be the case that some out-of-range value happens to work. But the *supported* range is as stated in the documentation.