Bug #24006 Documentation inconsistent WRT Spatial index support for InnoDB

Submitted: 6 Nov 2006 12:32 Modified: 29 Nov 2006 17:43
Reporter: Anders Karlsson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1.12/5.0 OS:Windows (Windows/Linux)
Assigned to: MC Brown CPU Architecture:Any

[6 Nov 2006 12:32] Anders Karlsson
Description:
The 5.1 manual implies that creating a SPATIAL INDEX on InnoDB is valid, but will really create a B-TREE Index, although the statement is a fair bit unclear on the matter:
http://dev.mysql.com/doc/refman/5.1/en/creating-spatial-indexes.html

Another place in the manual implies that SPATIAL INDEX really can be created using InnoDB, but that this may cause a crash:
http://dev.mysql.com/doc/refman/5.1/en/spatial-extensions.html

Fact is, none of this is true. You cannot create a spatial index on an InnoDB table.

These are partly covered by bugs #18929 (which caused the crash warning mentioned above) and #23536

How to repeat:
mysql> create table t2(c1 POINT, SPATIAL INDEX(c1));
ERROR 1464 (HY000): The used table type doesn't support SPATIAL indexes

Suggested fix:
There are three options:
- Let the code stay as it is, and fix the documentation.
- Follow the idea of the first referenced part of the documentation and create a B-TREE index on a SPATIAL column when using InnoDB.
- Implement R-TREE indexes for InnoDB.
[6 Nov 2006 12:50] MySQL Verification Team
Thank you for the bug report.

mysql> create table t2(c1 POINT, SPATIAL INDEX(c1)) engine=innodb;
ERROR 1464 (HY000): The used table type doesn't support SPATIAL indexes
mysql> select version();
+----------------+
| version()      |
+----------------+
| 5.1.13-beta-nt |
+----------------+
1 row in set (0.00 sec)

mysql>
[29 Nov 2006 17:43] MC Brown
The documentation has been updated with a warning that spatial indexes are not supported for the InnoDB, Archive and NDB engines.

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

Page generated in 0.051 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.