Bug #99620 | Synchonize Model generates in SQL statements "ZEROFILL" twice | ||
---|---|---|---|
Submitted: | 18 May 2020 20:50 | Modified: | 9 Jun 2020 12:38 |
Reporter: | Dominik Chvíla | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Workbench: Modeling | Severity: | S2 (Serious) |
Version: | 8.0.20 | OS: | Windows (Microsoft Windows 10 Pro) |
Assigned to: | CPU Architecture: | Any | |
Tags: | WBBugReporter |
[18 May 2020 20:50]
Dominik Chvíla
[9 Jun 2020 12:38]
MySQL Verification Team
Hello Dominik Chvíla, Thank you for the bug report. I tried to reproduce your issue on windows 10 with workbench 8.0.20 using dummy table and followed exact mentioned steps but I am not seeing any issues at my end. Regards, Ashwini Patil
[23 Aug 2020 18:20]
Brian Plunkett
This seems to be related to the issue where a User Defined Type has a flag set which duplicates the flag selected for the table in which the User Defined Type is applied. If my suspicions are correct, you might want to remove the setting from the table so that it only applies to the User Defined Type. This would allow you to appropriately replicate that type anywhere you wanted to use it. Example:... User Defined Type: `MyType` := INT(10) ZEROFILL Table Definition: CREATE TABLE `MyTable` (id `MyType` ZEROFILL)... Compiled as:... CREATE TABLE `MyTable` (id INT(10) ZEROFILL ZEROFILL)... Technique Correction:... User Defined Type: `MyType` := INT(10) ZEROFILL Table Definition: CREATE TABLE `MyTable` (id `MyType`)... Compiled as:... CREATE TABLE `MyTable` (id INT(10) ZEROFILL)... NOTE: The above code segments are *not* functional code, but shows you what might be happening in the macro expansive language constructs.
[23 Aug 2020 18:39]
Brian Plunkett
Additionally, the syntax of the following line illustrates the dependency bug which I was describing in my last comment. Sampled Code: `id_customer_invoice_data` INT(10) ZEROFILL ZEROFILL UNSIGNED NOT NULL AUTO_INCREMENT Code Indications: User Defined Type: `SomeType` := INT(10) ZEROFILL Table Attributes Set: `SomeType` ZEROFILL UNSIGNED NOT NULL AUTO_INCREMENT WARNING: The 'INT(10)' & 'UNSIGNED' type definitions conflict, and the parser couldn't resolve the conflict automatically based upon the present dependency matrix. Design Flaw: The dependency matrix should be such that the table definition inherits from type definitions, or the table definition exclusively overrides the type definition. This would also make the debugging & bug resolution process easier. Summary: If you're using User Defined Types, the only attributes which should be set at table level are those which are specific to table definitions only (i.e. key, index, and value generation attributes).