Bug #113305 Ambiguous error messages 'Unknown error -1' from storage engine
Submitted: 1 Dec 2023 8:13 Modified: 1 Dec 2023 11:43
Reporter: HE Y Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Archive storage engine Severity:S3 (Non-critical)
Version:8.0 OS:Linux
Assigned to: CPU Architecture:Any

[1 Dec 2023 8:13] HE Y
The Archive engine does not support indexed B-tree indexes, but the error message is ambiguous. "'Unknown error -1' from storage engine".

Instead, the error message for SPATIAL indexes is very clear.

How to repeat:
mysql> CREATE TABLE EmployeeArchive ( employee_id INT not null ) engine=Archive;
Query OK, 0 rows affected (0.01 sec)
mysql> CREATE INDEX idx_EmployeeArchive ON EmployeeArchive (employee_id) using hash;
ERROR 1030 (HY000): Got error -1 - 'Unknown error -1' from storage engine

mysql> CREATE TABLE SpatialTableArchive (
    ->     geom GEOMETRY not null
    -> ) ENGINE=Archive;
Query OK, 0 rows affected (0.01 sec)

mysql> CREATE SPATIAL INDEX idx_spatial_geom ON SpatialTableArchive (geom);
ERROR 1464 (HY000): The used table type doesn't support SPATIAL indexes
[1 Dec 2023 11:43] MySQL Verification Team
Hi Mr. Y,

Thank you very much for your bug report.

We were able to repeat your test case.

Verified as reported.