Bug #75703 | Cannot add a primary key to an ARCHIVE table | ||
---|---|---|---|
Submitted: | 30 Jan 2015 15:35 | Modified: | 1 Feb 2015 6:28 |
Reporter: | Chris Worfolk | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Archive storage engine | Severity: | S3 (Non-critical) |
Version: | 5.5.37 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | archive |
[30 Jan 2015 15:35]
Chris Worfolk
[30 Jan 2015 20:14]
Peter Laursen
http://dev.mysql.com/doc/refman/5.5/en/archive-storage-engine.html "The ARCHIVE engine supports the AUTO_INCREMENT column attribute. The AUTO_INCREMENT column can have either a unique or nonunique index. Attempting to create an index on any other column results in an error." . so this ALTER statement will work (verified!) ALTER TABLE `test`.`test2` CHANGE `id` `id` BIGINT(20) NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (`id`); (other syntax variants may be possible) -- Peter -- not a MySQL/Oracle person
[1 Feb 2015 6:28]
MySQL Verification Team
Hello Chris Worfolk, Thank you for the report. Imho this is not a bug, quoting from manual - "The ARCHIVE engine supports the AUTO_INCREMENT column attribute. The AUTO_INCREMENT column can have either a unique or nonunique index. Attempting to create an index on any other column results in an error" - http://dev.mysql.com/doc/refman/5.6/en/archive-storage-engine.html This behavior is consistent across 5.1/5.5/5.6 and 5.7 builds. FR Bug #74910 has been reported for the proper error message. Thanks, Umesh
[1 Feb 2015 6:28]
MySQL Verification Team
Related - Bug #74910