Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

i am getting below error:

Last_SQL_Errno: 1292

    Last_SQL_Error: Error 'Incorrect datetime value: '2013-03-10 02:00:00' for column 'last_login' at row 1' on query. Default database: 'platform'. Query: 'INSERT INTO app_player (creation_date, last_login, removed_date, app_id, user_id) VALUES ('2013-03-10 02:00:00', '2013-03-10 02:00:00', null, 400, 77870956)'
1 row in set (0.00 sec)

Table structure:

mysql> show create table app_player\G
*************************** 1. row ***************************
       Table: app_player
Create Table: CREATE TABLE `app_player` (
  `app_id` int(10) unsigned NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `creation_date` datetime NOT NULL,
  `removed_date` datetime DEFAULT NULL,
  `last_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`app_id`,`user_id`),
  KEY `idx_creation_date_app_id` (`creation_date`,`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
1 row in set (0.00 sec)

mysql veriosn is : 5.1.52

mysql> show global variables like '%date%';
+-----------------------------------------+-------------------+
| Variable_name                           | Value             |
+-----------------------------------------+-------------------+
| binlog_direct_non_transactional_updates | OFF               |
| date_format                             | %Y-%m-%d          |
| datetime_format                         | %Y-%m-%d %H:%i:%s |
| innodb_stats_auto_update                | 1                 |
| innodb_stats_update_need_lock           | 1                 |
| log_slave_updates                       | OFF               |
| low_priority_updates                    | OFF               |
| query_cache_wlock_invalidate            | OFF               |
| sql_log_update                          | ON                |
| sql_low_priority_updates                | OFF               |
| sql_safe_updates                        | OFF               |
+-----------------------------------------+-------------------+
share|improve this question
5  
That's the start if DST in some timezones (US EDT for instance) - that date/time doesn't really exist there. –  Mat Mar 10 '13 at 7:48
1  
@Mat good catch :) –  FreshPhilOfSO Mar 10 '13 at 11:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.