Bug #113305 Ambiguous error messages 'Unknown error -1' from storage engine

Submitted: 1 Dec 2023 8:13 Modified: 1 Dec 2023 11:43
Reporter: Wwwwing Wwwwing Email Updates:
Status: Verified Impact on me:
None 
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] Wwwwing Wwwwing
Description:
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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.