summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis.test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2015-03-15 22:20:38 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2015-03-15 22:20:38 +0400
commit37345bd9dde7fb948c439e73fbec5a88385162b2 (patch)
tree3170bbf05310ce08238dd63e53ea3edec511e58b /mysql-test/t/gis.test
parentca3041883725393baa6c645050ef926d782eb3a8 (diff)
downloadmariadb-git-37345bd9dde7fb948c439e73fbec5a88385162b2.tar.gz
MDEV-7529 GIS: ST_Relate returns unexpected results for POINT relations.
Problem was that we considered the point itself as the 'border' object. Instead of that the 'border' of a POINT is an empty set, and the point is the 'interior'. Another error fixed by the way - not all operations of the resulting function were properly allocated.
Diffstat (limited to 'mysql-test/t/gis.test')
-rw-r--r--mysql-test/t/gis.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 9c84848b979..125bd310844 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -1497,3 +1497,12 @@ select ST_IsRing(ST_LineFromText('LINESTRING(0 0,0 10,10 10,-10 -10, 0 -10, 0 0)
--echo #
SELECT ST_GEOMETRYTYPE(ST_PointOnSurface(ST_PolyFromText('POLYGON((-70.916 42.1002,-70.9468 42.0946,-70.9754 42.0875,-70.9749 42.0879,-70.9759 42.0897,-70.916 42.1002))')));
+--echo #
+--echo # MDEV-7529 GIS: ST_Relate returns unexpected results for POINT relations
+--echo #
+select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)'),'T*F**FFF*') AS equals;
+select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)'),'T*****FF*') AS contains;
+select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)'),'T*F**F***') AS within;
+select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(1 1)'),'FF*FF****') as disjoint;
+select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)'),'FF*FF****') as disjoint;
+