Bug #118145 Error Creating Index on EmployeeArchive Table
Submitted: 9 May 3:09 Modified: 12 May 7:01
Reporter: Chenglin Tian Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:9.2.0 OS:Ubuntu
Assigned to: CPU Architecture:x86

[9 May 3:09] Chenglin Tian
Description:
When attempting to create an index on the EmployeeArchive table using the HASH method, MySQL returns an error message: (1030, "Got error -1 - 'Unknown error -1' from storage engine"). This issue occurs despite the table being created successfully with valid parameters. Further investigation is needed to determine the underlying cause of the storage engine error.

How to repeat:
CREATE TABLE EmployeeArchive ( employee_id INT NOT NULL, employee_name VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, hire_date DATE DEFAULT '2000-01-01', salary DECIMAL(10, 2) DEFAULT 0.00) ENGINE=Archive;

Error executing SQL:
CREATE INDEX idx_EmployeeArchive ON EmployeeArchive (employee_id) USING HASH
Error Message:(1030, "Got error -1 - 'Unknown error -1' from storage engine")
[12 May 7:01] MySQL Verification Team
Hello Chenglin Tian,

Thank you for the bug 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" - https://dev.mysql.com/doc/refman/9.2/en/archive-storage-engine.html

FR Bug #74910 has been reported for the proper error message.

Regards,
Ashwini Patil