Bug #52300 Data Modeling ceates to long Identifiers (tablenames, columnnames ...)
Submitted: 23 Mar 2010 10:35 Modified: 23 Apr 2010 11:44
Reporter: Michael Schramm Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.16 OSS Beta OS:Windows (Windows 7)
Assigned to: CPU Architecture:Any
Tags: Data Modeling, indentifier

[23 Mar 2010 10:35] Michael Schramm
Description:
In data modeling mode (EER Diagram) the GUI generates identifiers longer than the allowed 64 chars

Link to documentation
http://dev.mysql.com/doc/refman/5.1/en/identifiers.html

Such EER Diagrams can't used for "Forward Engineering".
The import will fail.

How to repeat:
You can generate such invalid identifiers automaticly i.e. with foreign key relationships if you 

a) create a n:m relationship between tables with long identifiers
the new created table gets the identifier tablename1_has_tablename2

b) create a 1:n realtionship that referenzes a table.column with long identifiers the new generated column 

In both cases the new identifiers where generated automaticly even if the new identifier is > 64 characters

Suggested fix:
Cut all identiefiers at 64 characters

if it is an identifier for tables / views... choose a numerical ending if the cut of the identifier generates a identifier that is already in used

ie
tablename (identifier already used)
tablename2 (new cutted identifier with numerical ending)
tablename3
...

How about a general pre-check if choosen identifiers are not valid to the syntax of identifiers
[23 Mar 2010 11:44] Valeriy Kravchuk
Looks like a duplicate of bug #51580. Please, check.
[23 Apr 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".