Bug #70515 Workbench cannot handle fractional timestamp
Submitted: 3 Oct 2013 19:01 Modified: 12 Mar 2014 1:37
Reporter: John Duncan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:6.0.7 OS:Any
Assigned to: CPU Architecture:Any

[3 Oct 2013 19:01] John Duncan
Description:
On reverse engineering a table, mysql reports:

CREATE TABLE `tweet` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `author` varchar(20) CHARACTER SET utf16le DEFAULT NULL,
  `message` varchar(140) CHARACTER SET utf16le DEFAULT NULL,
  `date_created` timestamp(2) NOT NULL DEFAULT CURRENT_TIMESTAMP(2) ON UPDATE CURRENT_TIMESTAMP(2),
  PRIMARY KEY (`id`),
  KEY `idx_btree_date` (`date_created`),
  KEY `idx_btree_author_date` (`author`,`date_created`),
 CONSTRAINT `author_fk` FOREIGN KEY(`author`) REFERENCES `author` (`user_name`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=ndbcluster DEFAULT CHARSET=latin1

and workbench responds:

ERROR: Line 44: SQL syntax error near '2) ON UPDATE CURRENT_TIMESTAMP(2),
  PRIMARY KEY (`id`),
  KEY `idx_btree_date` '. Statement skipped.

How to repeat:
Create table as above and reverse engineer.
[4 Oct 2013 10:32] MySQL Verification Team
Hello John,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[12 Mar 2014 1:37] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.3 release, and here's the changelog entry:

MySQL Workbench failed to reverse engineer tables containing "TIME(n)" and
"DATETIME(n)" columns.

Thank you for the bug report.