Bug #25273 Primary key icon and checkbox not synchronized properly
Submitted: 25 Dec 2006 22:36 Modified: 22 Jan 2007 16:15
Reporter: Geoff Hart Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.2.8 OS:Windows (WinXP SP2)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: GUI, primary key, primary key icon

[25 Dec 2006 22:36] Geoff Hart
Description:
When editing a table, it is possible to get the primary key icon in the list view and the primary key check box under 'Column Details' showing different values for the same column, which is very confusing.

How to repeat:
1) Create a table with definition:
create table test (id int unsigned not null auto_increment, primary key(id), field1 varchar(255), field2 varchar(255));

2) Open this table in the MySQL Admin table editor

3) Click once on the word 'id' in the first column to highlight it and the select the 'Column Details' tab. Both show that this field is a primary key for the table.

4) Now click on the key icon beside the word 'id'. The icon will change to a blue diamond showing it is not a primary key, but the 'Column Details' tab shows that this is still a primary key.

If you click on the text 'field1' now and then click back on the text 'id', this will get both values in-sync again as id not being a primary key.

(Side Note 1)
If you click on the text 'field1' and then click on the key icon (selecting the column and changing the primary key in one step) it updates both values correctly.

(Side Note 2)
If you highlight field 'id' and then check/uncheck not null/auto inc, in either place both are updated at the same time. Also, if you select/de-select the primary key from the 'Column Details' tab, both values are updated correctly.

Suggested fix:
Update behavior so that all values are updated when the primary key is changed.
[26 Dec 2006 9:45] Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[22 Jan 2007 16:15] 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 bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html