Bug #40714 Mysql Workbench automatically include NN columns in primary key
Submitted: 13 Nov 2008 19:32 Modified: 30 Mar 2009 14:57
Reporter: Pierre-Olivier Vares Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.1.4 OS:Linux (Ubuntu 8.04, kernel 2.6.24.21)
Assigned to: Maksym Yehorov CPU Architecture:Any
Tags: NOT NULL, primary

[13 Nov 2008 19:32] Pierre-Olivier Vares
Description:
When editing the columns of a table, columns that I check as "Not Null" are automatically added to the PK.
If "PK" is unchecked, then the "NN" is automatically unchecked.
In brief, no way to create NN columns that aren't part of the PK (in "Indexes" tab, the PK check for this column can't be unchecked)

When I check or uncheck the "NN" checkbox, I got the following message in the console :
(mysql-workbench-bin:10746): Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed
Maybe it's related, maybe not...

This is really strange, as I work with MySql Workbench under windows (version 5.0.x) at work, and don't get any trouble with that.

I installed MWB following the instructions of http://dev.mysql.com/workbench/?p=169, adding
deb ftp://ftp.mysql.com/pub/mysql/download/gui-tools/ubuntu/ binary/
to my sources.list, and installing libctemplate0 from GoogleCode.

How to repeat:
- Create a table "page"
- rename the first column as "id"; make it NN, AI and PK
- create a new column "title" as VARCHAR(45)
- check "NN" for this column
The "PK" checkbox is automatically checked (and a "key" icon appears to the left of the field)
[13 Nov 2008 20:41] Markus Gschwendt
i can confirm this on wb 5.1.4 ubuntu 8.10 64bit.

further it's not possible to uncheck the column on the indexes-tab. only on the columns-tab i can uncheck "primary key".
also have a look on AI! it's checked too.
[14 Nov 2008 11:17] Maksym Yehorov
Fixed in rev. 3542.
[3 Dec 2008 14:00] Johannes Taxacher
this has been corrected now