Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12384

Cannot create SPATIAL/RTREE index on virtual column

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.2
    • N/A
    • GIS, Virtual Columns
    • None
    • Linux x86 CentOS 6.4

    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

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              karlsson Anders Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.