Support for non auto_increment keys
This documentation says "ARCHIVE allows a maximum of one key. The key can be a PRIMARY KEY on an AUTO_INCREMENT column. However, it has a limitation ...".
This sounds like AUTO_INCREMENT is an optional setting that causes a limitation, but trying to create an archive without auto increment gives an error:
CREATE TABLE t1 (id int NOT NULL, PRIMARY KEY (id)) ENGINE = ARCHIVE;
Error: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
Just adding AUTO_INCREMENT solves the problem.
So, is this a bug or AUTO_INCREMENT is mandatory for ARCHIVE tables? If so, the documentation should say MUST, not CAN.
Answer Answered by Elena Stepanova in this comment.
It is not a bug but a part of the limitation. The key can be a PRIMARY KEY (or it can be an ordinary non-unique index), but either way it must be on an AUTO_INCREMENT column.
I agree that this part is worth rephrasing, for clarity.