Bug #82105 Can't create a primary key from WorkBench
Submitted: 5 Jul 2016 8:47 Modified: 5 Aug 2016 9:42
Reporter: JL B. Schneider-Electric Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:6.3.7 OS:Windows (Microsoft Windows 7 Professional Service Pack 1)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[5 Jul 2016 8:47] JL B. Schneider-Electric
Description:
Hi,

I can't create a primary key on an eisting table without an error, always the same :

Operation failed: There was an error while applying the SQL script to the database.
Executing:
ALTER TABLE `conduitelimoges`.`rebuts` 
DROP PRIMARY KEY,
ADD PRIMARY KEY (`Idrebuts`, );

ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
SQL Statement:
ALTER TABLE `conduitelimoges`.`rebuts` 
DROP PRIMARY KEY,
ADD PRIMARY KEY (`Idrebuts`, )

How to repeat:
Create a table, validate.

Try to turn a field as primary key.
[5 Jul 2016 9:42] MySQL Verification Team
People provide the output of show create table table_name which fails to add the PK. Thanks.
[6 Aug 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".