Bug #15432 MySQL Admin generates incomplete CREATE TABLE code for tables with primary keys
Submitted: 2 Dec 2005 11:43 Modified: 6 Dec 2005 5:18
Reporter: Harald Wagener Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.1.0 OS:MacOS (Mac OS X)
Assigned to: Alfredo Kojima CPU Architecture:Any

[2 Dec 2005 11:43] Harald Wagener
Description:
creating tables via mysql admin fails if the table is to include a primary key. The GUI reflects all
necessary changes, but the code is incomplete - missing the PRIMARY KEY(...) part

How to repeat:
Open MySQL Administrator, connect, select a Catalog. Select 'Table Actions->Create Table'. Ad column, and set it to not null auto increment, and in 'Column Details' tab, select 'Primary Key'. click Apply. The pop-up shown does not include the PRIMARY KEY part in the table creation code.
If You click on 'execute', the correct error (error 1075) is raised and the table is not created.
[2 Dec 2005 12:06] Valeriy Kravchuk
Thank you for a problem report. Version 1.1.5 on XP gave me correct SQL when I created table according to the steps you described:

CREATE TABLE `test`.`ttt` (
  `c1` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  PRIMARY KEY(`c1`)
)
ENGINE = InnoDB;

But you are on Mac OS X, and 1.1.0 is still the latest version released for it. So, you have either to wait for 1.1.5 (or 1.1.14, at least) binaried to be released by MySQL, or compile it yourself from the sources. Please, inform about the results, if you choose to compile yourself.
[2 Dec 2005 14:07] Harald Wagener
I could not find complete build instructions for mysql administrator on mac os x. Is it documented somewhere?

Regards,
     Harald
[2 Dec 2005 16:04] Valeriy Kravchuk
I've just discussed your bug report with our GUI developers. New build for Mac OS X should be started today. So, please, wait for a day and try with a newer version. The bug is fixed already. Inform about the results, please.

The build process is described in the README.MacOSX file, it might be a bit outdated, but should containt enough information for you if you do not want to just wait.
[6 Dec 2005 5:18] Alfredo Kojima
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