Refer: http://bugs.mysql.com/bug.php?id=74238

here I prefer the 'relaxed parsing' in Maria DB.


But look at this:

CREATE TABLE `d` (
`rec_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`datetime` DATETIME(4) DEFAULT NULL,
`timestamp` TIMESTAMP(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(5) ON UPDATE CURRENT_TIMESTAMP(4),
PRIMARY KEY (`rec_id`)
) ENGINE=INNODB;
-- it actually creates the table

SHOW CREATE TABLE d;
/* returns

CREATE TABLE `d` (
  `rec_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `datetime` datetime(4) DEFAULT NULL,
  `timestamp` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4),
  PRIMARY KEY (`rec_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
*/

I don't think DEFAULT CURRENT_TIMESTAMP(5) should be accepted for the datatype DATETIME(4).


What say?



-- Peter
-- Webyog