summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2014-11-15 21:30:16 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2014-11-15 21:30:16 +0400
commitc9742ceac5bd682e24a435c36524305eecca7950 (patch)
treeef3c758ff0135c6f1b9a9a3137c0d125097dfa5d /mysql-test
parent50c5339272403dfac435c7df632274ad8b18aaf8 (diff)
downloadmariadb-git-c9742ceac5bd682e24a435c36524305eecca7950.tar.gz
MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0)).
Fixed the case when a polygon contains a single-point ring.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/gis.result6
-rw-r--r--mysql-test/t/gis.test6
2 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 6c4d117042a..1d4a1eea8ff 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1540,3 +1540,9 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'E043'
Warning 1300 Invalid utf8 character string: 'E043'
drop table t1;
+#
+# MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0))
+#
+select st_within(GeomFromText('Polygon((0 0))'), Point(0,0));
+st_within(GeomFromText('Polygon((0 0))'), Point(0,0))
+1
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 9e743a65cdb..34a0309b908 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -1398,3 +1398,9 @@ insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)"));
insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)"));
select equals(`a`,convert(`a` using utf8)) from `t1`;
drop table t1;
+
+
+--echo #
+--echo # MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0))
+--echo #
+select st_within(GeomFromText('Polygon((0 0))'), Point(0,0));