Bug #33733 Conversion of a table to ARCHIVE fails, but only sometimes
Submitted: 8 Jan 2008 3:30 Modified: 8 Jan 2008 6:45
Reporter: Glynn Durham Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Archive storage engine Severity:S3 (Non-critical)
Version:5.1.22 OS:MacOS
Assigned to: CPU Architecture:Any

[8 Jan 2008 3:30] Glynn Durham
Description:
Conversion of a table to ARCHIVE succeeds sometimes; fails others.  This behavior seems inconsistent and unclear.

How to repeat:
The following two statements:

   CREATE TABLE foo (a INT, PRIMARY KEY(a));

   ALTER TABLE foo ENGINE = ARCHIVE;

give error:

   ERROR 1005 (HY000): Can't create table 'world.#sql-17ed_1' (errno: -1)

And yet, these statements work without error:

   CREATE DATABASE world;

   USE world;

   SOURCE world.sql;

   CREATE TABLE City_Test LIKE City;

   ALTER TABLE City_Test ENGINE = ARCHIVE;

Which is it?  Can I alter a table with a primary key to ARCHIVE, or not?
[8 Jan 2008 6:45] Valeriy Kravchuk
This is not a bug. You can not have index on non-AUTO_INCREMENT column in ARCHIVE table. Read http://dev.mysql.com/doc/refman/5.1/en/archive-storage-engine.html for the details.