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

missing constraints for spatial column types

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.28
    • Fix Version/s: 5.5.30
    • Component/s: None
    • Labels:
      None
    • Environment:
      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

              • Assignee:
                holyfoot Alexey Botchkov
                Reporter:
                georg Georg Richter
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: