MySQL 5.6 DateTime Column Type


Whilst migrating a table I found an interesting thing.  The table contained a datetime field and the plan was to migrate directly from 5.5 to 5.6.  The method I choose was to SELECT INTO....OUTFILE (mainly because the table was large, over 1 billion rows, and is partitioned).  As I was loading the data into the table using LOAD INFILE it was thoroughing out errors:

ERROR 1292 (22007): Incorrect datetime value: '1970-01-01 00:00:00' for column 'publish_date' at row 2374801

Interestingly enough the earliest time the column can have is '1970-01-01 00:00:01' UTC. 

No comments:

Post a Comment