Bug #74910 ERROR 1030 (HY000): Got error -1 from storage engine for ARCHIVE storage engine
Submitted: 18 Nov 2014 0:05 Modified: 18 Nov 2014 20:26
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Storage Engines Severity:S2 (Serious)
Version:5.6.20, 5.6.23, 5.7.6, 5.5.42 OS:Any
Assigned to: CPU Architecture:Any
Tags: opt

[18 Nov 2014 0:05] Roel Van de Paar
Description:
mysql> CREATE TABLE t1 (c1 INT PRIMARY KEY) Engine=ARCHIVE;
ERROR 1030 (HY000): Got error -1 from storage engine

How to repeat:
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT PRIMARY KEY) Engine=ARCHIVE;
[18 Nov 2014 8:35] MySQL Verification Team
Hello Roel,

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.

// 5.6.23

[test]> DROP TABLE IF EXISTS t1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

[test]> CREATE TABLE t1 (c1 INT PRIMARY KEY) Engine=ARCHIVE;
ERROR 1030 (HY000): Got error -1 from storage engine

// 5.7.6

[test]> DROP TABLE IF EXISTS t1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

[test]> CREATE TABLE t1 (c1 INT PRIMARY KEY) Engine=ARCHIVE;
ERROR 1030 (HY000): Got error -1 from storage engine
[test]>

[test]> show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
..

| ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
9 rows in set (0.00 sec)

// 5.5.42

[test]> DROP TABLE IF EXISTS t1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

[test]> CREATE TABLE t1 (c1 INT PRIMARY KEY) Engine=ARCHIVE;
ERROR 1005 (HY000): Can't create table 'test.t1' (errno: -1)
[test]>
[test]> show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
.
.
| ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
9 rows in set (0.00 sec)

// 5.1.73

[test]> DROP TABLE IF EXISTS t1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

[test]> CREATE TABLE t1 (c1 INT PRIMARY KEY) Engine=ARCHIVE;
ERROR 1005 (HY000): Can't create table 'test.t1' (errno: -1)
[test]>
[test]> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
.
| ARCHIVE    | YES     | Archive storage engine                                         | NO           | NO   | NO         |
.
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
8 rows in set (0.00 sec)

Alternatively, with auto_increment it works..

mysql> CREATE TABLE t1 (c1 INT auto_increment PRIMARY KEY) Engine=ARCHIVE;
Query OK, 0 rows affected (0.20 sec)

Thanks,
Umesh
[18 Nov 2014 8:51] MySQL Verification Team
.oO maybe a feature request for a proper error message?
[18 Nov 2014 9:05] MySQL Verification Team
Converting this to FR for more clear and specific error message instead of "ERROR 1030 (HY000): Got error -1 from storage engine for ARCHIVE storage engine"
[18 Nov 2014 20:26] Roel Van de Paar
At the moment, -1 is <undefined>; we do not know what is happening.