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: Won't Fix 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.
[14 Sep 18:04] Omer Barnir
Posted by developer:

This issue applies to the legacy MySQL Workbench 8.x implementation that is no longer supported or maintained.
MySQL Workbench 26.7 is a complete rewrite using a new technology stack and does not use the affected legacy implementation.
Therefore, this issue is not applicable to the current MySQL Workbench product and as such is closed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.