Bug #7038 Wrong ALTER TABLE statement
Submitted: 6 Dec 2004 13:32 Modified: 7 Dec 2004 22:59
Reporter: Victoria Reznichenko Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.0.16 OS:
Assigned to: CPU Architecture:Any

[6 Dec 2004 13:32] Victoria Reznichenko
Description:
If I try to remove "primary key" sign from id column and press "Apply changes". MA generates the following ALTER TABLE statement:

ALTER TABLE `test`.`a` DROP PRIMARY KEY
, DROP INDEX `str`
, ADD 

If I try remove PRIMARY key from Index tab, MA generates the following ALTER TABLE statement

ALTER TABLE `test`.`a` DROP INDEX `str`
, ADD ;

How to repeat:
1. Create table statement:

CREATE TABLE `test`.`a` (
  `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  `str` VARCHAR(45) NOT NULL,
  PRIMARY KEY(`id`),
  INDEX `str`(`str`)
)
TYPE = InnoDB;

2. Try to remove primary key
[7 Dec 2004 22:59] Michael G. Zinner
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