@@ -833,8 +833,6 @@ ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used le
ALTER TABLE t1 ADD d INT;
ALTER TABLE t1 ADD KEY (d(20));
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
ALTER TABLE t1 ADD e GEOMETRY NOT NULL, ADD SPATIAL KEY (e(30));
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
create table t1 (g geometry not null, spatial key(g(10)));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(10)))' at line 1
create table t1 (g geometry not null, spatial key(g asc));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc))' at line 1
create table t1 (g geometry not null, spatial key(g desc));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc))' at line 1
create table t1 (g geometry not null, f geometry not null, spatial key(g,f));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'f))' at line 1
create table t1 (g geometry not null, f geometry not null);
create spatial index bad on t1 (g(10));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(10))' at line 1
create spatial index bad on t1 (g asc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc)' at line 1
create spatial index bad on t1 (g desc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc)' at line 1
create spatial index bad on t1 (f,g);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'g)' at line 1
alter table t1 add spatial index bad (g(10));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(10))' at line 1
alter table t1 add spatial index bad (g asc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc)' at line 1
alter table t1 add spatial index bad (g desc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc)' at line 1
alter table t1 add spatial index bad (f,g);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'g)' at line 1
ERROR 42000: All parts of a SPATIAL index must be NOT NULL
ALTER TABLE tab add SPATIAL INDEX idx1(c1);
ERROR HY000: Incorrect arguments to SPATIAL INDEX
ALTER TABLE tab ADD SPATIAL INDEX idx6(c2 ASC) USING BTREE;
ALTER TABLE tab ADD SPATIAL INDEX idx6(c2) USING BTREE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING BTREE' at line 1
ALTER TABLE tab ADD SPATIAL INDEX idx6(c2 ASC) USING HASH;
ALTER TABLE tab ADD SPATIAL INDEX idx6(c2) USING HASH;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING HASH' at line 1
SHOW CREATE TABLE tab;
Table Create Table
...
...
@@ -340,7 +340,7 @@ DELETE FROM tab;
ALTER TABLE tab ADD PRIMARY KEY(c2);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
CREATE SPATIAL INDEX idx2 ON tab(c2 ASC);
CREATE SPATIAL INDEX idx2 ON tab(c2);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE tab ADD CONSTRAINT const_1 UNIQUE(c2);
...
...
@@ -449,16 +449,16 @@ ANALYZE TABLE tab;
Table Op Msg_type Msg_text
test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
ALTER TABLE tab ADD SPATIAL INDEX idx2(c2 ASC);
ALTER TABLE tab ADD SPATIAL INDEX idx2(c2);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE tab ADD SPATIAL KEY idx3(c3 DESC);
ALTER TABLE tab ADD SPATIAL KEY idx3(c3);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE tab ADD SPATIAL INDEX idx4(c4 ASC) COMMENT 'testing spatial index on Polygon';
ALTER TABLE tab ADD SPATIAL INDEX idx4(c4) COMMENT 'testing spatial index on Polygon';
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE tab ADD SPATIAL KEY idx5(c5 ASC) COMMENT 'testing spatial index on Geometry';
ALTER TABLE tab ADD SPATIAL KEY idx5(c5) COMMENT 'testing spatial index on Geometry';
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE tab ADD INDEX idx6(c4(10)) USING BTREE;
create table t1 (g geometry not null, spatial key(g(10)));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(10)))' at line 1
create table t1 (g geometry not null, spatial key(g asc));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc))' at line 1
create table t1 (g geometry not null, spatial key(g desc));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc))' at line 1
create table t1 (g geometry not null, f geometry not null, spatial key(g,f));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'f))' at line 1
create table t1 (g geometry not null, f geometry not null);
create spatial index bad on t1 (g(10));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(10))' at line 1
create spatial index bad on t1 (g asc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc)' at line 1
create spatial index bad on t1 (g desc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc)' at line 1
create spatial index bad on t1 (f,g);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'g)' at line 1
alter table t1 add spatial index bad (g(10));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(10))' at line 1
alter table t1 add spatial index bad (g asc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc)' at line 1
alter table t1 add spatial index bad (g desc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc)' at line 1
alter table t1 add spatial index bad (f,g);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'g)' at line 1