Bug #48780 incorrect error message ER_NOT_SUPPORTED_YET for rtree index
Submitted: 15 Nov 2009 12:46 Modified: 17 Nov 2009 3:07
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.1.42 OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D4 (Minor)

[15 Nov 2009 12:46] Shane Bester
Description:
mysql> create table `t1`(
    -> `a` point not null, index using rtree (`a`,`a`))engine=myisam;
ERROR 1235 (42000): This version of MySQL doesn't yet support 'RTREE INDEX'

but alas! this version does support it, when used correctly:

mysql> create table `t1`(`a` point not null, spatial index using rtree (`a`))engine=myisam;
Query OK, 0 rows affected (0.66 sec)

How to repeat:
drop table if exists `t1`;
create table `t1`(`a` point not null, index using rtree (`a`,`a`))engine=myisam;
drop table if exists `t1`;
create table `t1`(`a` point not null, spatial index using rtree (`a`))engine=myisam;

Suggested fix:
I imagine ER_WRONG_ARGUMENTS should be returned in the first example.
[16 Nov 2009 21:23] Omer Barnir
This is not a bug. When putting both statements one next to the other it appears as if the first statement is giving the wrong error. But the fact is that rtree indexes are not supported for non-spatial indexes so if you look at the first statement in isolation - the returned error that it is not supported is correct.