Bug #88202 Table truncated before the "ON UPDATE CURRENT_TIMESTAMP (6)" clause
Submitted: 24 Oct 2017 11:53 Modified: 25 Oct 2017 5:56
Reporter: Kaycee Byron Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S5 (Performance)
Version:6.3.8, 6.3.9 OS:Windows (Microsoft Windows 7 Professional Service Pack 1)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[24 Oct 2017 11:53] Kaycee Byron
Description:

When reverse engineering, any table that has the "ON UPDATE CURRENT_TIMESTAMP (6)" clause is truncated before the clause, i.e. any columns appearing after this clause in the script are not in the ERD. 

How to repeat:
Create a table with a timestamp column having the "ON UPDATE CURRENT_TIMESTAMP (6)" clause.

CREATE TABLE  addr (
    ADDR_UID VARCHAR(50) NOT NULL,
    ADDR_KEY_CD VARCHAR(40) NOT NULL,
    CITY VARCHAR(40) NULL DEFAULT NULL,
    LINE1 VARCHAR(150) NULL DEFAULT NULL,
    LINE2 VARCHAR(150) NULL DEFAULT NULL,
    POSTAL VARCHAR(20) NULL DEFAULT NULL,
    STATE_KEY_CD VARCHAR(40) NULL DEFAULT NULL,
    FLEX_FIELD VARCHAR(32000) NULL DEFAULT NULL,
    INSRT_TS TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP (6),
    CHNG_TS TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP (6) ON UPDATE CURRENT_TIMESTAMP (6),
    INSRT_USR_ID VARCHAR(50),
    CHNG_USR_ID VARCHAR(50),
    ACTIVE_FLAG TINYINT(1) DEFAULT '1' NOT NULL,
    PRIMARY KEY (ADDR_UID)
);

Reverse engineer the table.  It will reverse engineer but the following columns and the primary key will be missing:
    INSRT_USR_ID VARCHAR(50),
    CHNG_USR_ID VARCHAR(50),
    ACTIVE_FLAG TINYINT(1) DEFAULT '1' NOT NULL,
    PRIMARY KEY (ADDR_UID)

Suggested fix:
The modeler needs to recognize this clause and continue with the rest of the columns in the table
[25 Oct 2017 5:56] MySQL Verification Team
Hello Kaycee,

Thank you for the report and test case.
Observed this with WB 6.3.9 on Win7.

Thanks,
Umesh
[4 Jul 2019 20:16] Mike Caines
Has there been any progress made on a fix for this? It still seems to be an issue as of today.