#1103 Timestamp editor problem

closed-rejected
Marc Delisle
5
2009-07-05
2009-06-16
No

I have this bug with v3.1.3 too.

CREATE TABLE IF NOT EXISTS `tbl` (
`id` int(11) unsigned NOT NULL auto_increment,
`createdate` timestamp NULL default NULL COMMENT 'mydate',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=29 ;

INSERT INTO `tbl` (`id`, `createdate`) VALUES
(27, '2009-06-16 15:33:12');

I am click to "edit" button for row #27. I have '2009-06-16 15:33:12' in the "value" column and function "NOW" in the selectbox. I am do not editet fields and selectbox. But I have new value of `createdate` field saved in the row #27 after "OK" click on the editor page.
I see result SQL: UPDATE `test`.`tbl` SET `createdate` = NOW( ) WHERE `tbl`.`id` =27 LIMIT 1 ;

Discussion

  • Marc Delisle
    Marc Delisle
    2009-06-20

    • labels: 509096 --> Data insertion/extraction/manipulation
    • milestone: 899252 -->
    • assigned_to: nobody --> lem9
    • status: open --> pending-rejected
     
  • Marc Delisle
    Marc Delisle
    2009-06-20

    This issue is brought back from time to time. There are pros and cons about putting NOW by default in the Function column. I believe that you should not have clicked Go, or that the datatype is not correctly chosen. For a createdate you should chose DATETIME and not TIMESTAMP.

     
    • status: pending-rejected --> closed-rejected
     
  • This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).