Bug #44675 MySQL Workbench Rows not appear in EER diagram for table with > 20 columns
Submitted: 5 May 2009 18:55 Modified: 10 Jun 2009 16:32
Reporter: Rob Hodgkinson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.1.12 OS:MacOS (5.1.9 beta-5.2 alpha)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: 20, CHECKED, columns, EER, table

[5 May 2009 18:55] Rob Hodgkinson
Description:
I create a sript containing a single table and more than 20 columns (sample shown in "How to Repeat" box below).

Load MySQLWorkbench, File/Import the table.
Add a new EER diagram.
Drag the table name from the catalog pane (right side) and drop it onto the EER diagram worksheet.
The table box appears, but no rows are shown (just ...).

If I double click the table in the catalog pane, it shows with all 21 columns below the EER diagram sheet in the table tab.

My database has 40 tables, 5 of which are blank on the EER diagram, so this is a serious issue for me if I continue to use MySQLWorkbench to document the model. 

How to repeat:
Here is a simple script:
=======================
use try;
create table deals                                                      
( field1         integer           not null ,                        
 field2          integer           not null ,                        
 field3          integer           not null ,                        
 field4          integer           not null ,                        
 field5          integer           not null ,                        
 field6          integer           not null ,                        
 field7          integer           not null ,                        
 field8          integer           not null ,                        
 field9          integer           not null ,                        
 field10        integer           not null,                        
 field11        integer           not null ,                         
 field12        integer           not null ,                       
 field13        integer           not null ,                        
 field14        integer           not null ,                        
 field15        integer           not null ,                        
 field16        integer           not null ,                        
 field17        integer           not null ,                        
 field18        integer           not null ,                        
 field19        integer           not null ,                        
 field20        integer           not null,
 field21        integer           not null )
;                                                                       
===================================================
This problem was reproduced on all Mac OSX Versions I tried.  I run Mac OSX 10.5.6 (nothing special) and I reproduced with the above script on Release 5.1.9 beta, 5.1.12 beta and 5.2 alpha ... all just now.

It works on 5.0 in Windows.
[5 May 2009 21:13] Alfredo Kojima
Hi

The ... is shown when there are too many columns in the table and Workbench switches the table to "summarized" view, making it display only primary keys and foreign keys. The number of columns that will trigger that switch can be changed in Preferences. We realize the current implementation is confusing, so that will be fixed to be clearer. However, in your case you get no columns displayed at all because you don't have any primary keys in your tables, which is usually not a good database design practice, regardless of any issues with Workbench.
[5 May 2009 21:34] Rob Hodgkinson
Thanks for the informative reply Alfredo.

The only funny observation is that this behaviour is not in the windows version (admittedly that was 5.0).  A better behaviour would be to allow the user to 'resize' the table 'box', but only show the columns that fit, with the last row showing '...' (rather than the whole table appearing as '...').

Anyway, I understand what you are saying, but differ on the issue about a primary key.  Not every table in a schema needs to have a primary key, some have key fields which are repeated (eg transaction files based on date, but for which there is no transaction number), so I certainly disagree with your closing remark that 'not having a primary key is not a good db design practice'.

Thank you.../Regards Rob
[7 May 2009 14:42] Valeriy Kravchuk
Verified just as described.
[29 May 2009 0:09] Alfredo Kojima
This feature has been changed to the ability to manually resize the table, besides automatically limiting the number of columns to a user selectable value, by order of appearance, regardless of being key columns or not.
[3 Jun 2009 19:08] Johannes Taxacher
feature changed as described by developer. new behaviour will be in 5.1.13
[10 Jun 2009 16:32] Tony Bedford
An entry has been added to the 5.1.13 changelog:

MySQL Workbench appeared not to display table rows in an EER diagram for tables that had more than 20 columns.

MySQL Workbench now includes the ability to manually resize the table, besides automatically limiting the number of columns to a user selectable value, by order of appearance, regardless of being key columns or not.