Bug #13224 ZEROFILL and UNSIGNED column attributes behave strangely in Table Editor
Submitted: 15 Sep 2005 14:41 Modified: 13 Apr 2006 9:17
Reporter: David Govek Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Preview Severity:S2 (Serious)
Version:1.0.2 OS:Windows (Win2k SP4)
Assigned to: Mike Lischke CPU Architecture:Any

[15 Sep 2005 14:41] David Govek
Description:
The behavior of this bug seems to depend on whether a table was created with the layout tool or imported with Reverse Engineering.

While editing a table with the Table Editor, there are two different places to change the ZEROFILL and UNSIGNED flags ("FLAGS"): in the Columns tab pane or in the Advanced "Column Details" pane.

When editing a table created with the Table tool in the Layout
------------------------------------------------------------
Only the changes made in the "Advanced" area are kept.
Changes made in the "Advanced" area are actively reflected in the "Columns" tab.
Changes made in the "Columns" tab are NOT actively reflected in the "Advanced" area.

When editing a table created imported by Reverse Engineering
------------------------------------------------------------
No changes made to the FLAGS persist after closing and re-opening the Table Editor.
Changes made in the "Advanced" area are actively reflected in the "Columns" tab.
Changes made in the "Columns" tab cause the "Advanced" area flags to be cleared.

While there seems to be a workaround for tables created in Layout, it seems not possible to have UNSIGNED or ZEROFILLed columns on any tables Reverse Engineered.

How to repeat:
1) Create a table to import

CREATE TABLE `foo` (`bar` int(4) PRIMARY KEY);

2) Import the table by Reverse Engineering using default options.
3) In the Layout view, click the "pencil" of the table `foo`
4) Select `bar` in the "Columns" tab.

The FLAGS are clear in both the "Advanced" pane and the "Columns" tab.

6) adjust FLAGS in each area, note the behavior described above.

7) Close the Table Editor, use the Table Tool to create a new table in the Layout. "Pencil" this table to view the editor.
8) Note the different behavior as described above.

Suggested fix:
The desired behavior is to have the two FLAGS edit areas properly update each other, and for those changes to persist when the Editor is closed.

Of couse the great fear is in why the behavior is different for tables created by these two different avenues as this could be a clue to some other underlying problem.
[16 Sep 2005 18:09] Jorge del Conde
Thank you for your bug report.  I was able to reproduce this bug using the supplied 'how-to-repeat'
[13 Apr 2006 9:17] Mike Lischke
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html