[MDEV-12384] Cannot create SPATIAL/RTREE index on virtual column Created: 2017-03-28  Updated: 2017-04-03  Resolved: 2017-04-03

Status: Closed
Project: MariaDB Server
Component/s: GIS, Virtual Columns
Affects Version/s: 10.2
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Anders Karlsson Assignee: Sergei Golubchik
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Linux x86 CentOS 6.4


Issue Links:
Duplicate
is duplicated by MDEV-7687 Can't create SPATIAL index on top of ... Confirmed

 Description   

Assume the table:

CREATE TABLE foo(
   x INTEGER NOT NULL,
   y INTEGER NOT NULL,
   pt POINT AS (POINTFROMTEXT(CONCAT('POINT ', x, ',', y, ')')))
);

The column pt is a virtual column, which it should be possible to create an index on, pre 10.2 it had to be persistent but that makes no difference here:

CREATE SPATIAL INDEX foo_ix1 ON foo(pt);

And this fails with:
ERROR 1252 (42000): All parts of a SPATIAL index must be NOT NULL



 Comments   
Comment by Sergei Golubchik [ 2017-04-03 ]

Exact duplicate of MDEV-7687

Generated at Thu Feb 08 07:57:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.