Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5.28
-
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
|