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

missing constraints for spatial column types

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.28
    • 5.5.30
    • None
    • None
    • all platforms

    Description

      SPATIAL columns which are not defined as GEOMETRY, e.g. POINT, LINE, POLYGON accept all kind of geometries.

      How to repeat:

      create table t1 (a point not null, spatial index(a));
       
      SET @poly = 'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))';
       
      insert into t1 values(GeomFromText(@poly));
      >>Query OK, 1 row affected (0.29 sec)

      Testing the same with PostGIS:

      test=# insert into t1 values (GeomFromText('POLYGON(1 1, 2 2, 1 1)'));
      ERROR:  column "a" is of type point but expression is of type geometry

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              georg Georg Richter
              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.