summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2015-06-23 11:57:05 +0500
committerAlexey Botchkov <holyfoot@askmonty.org>2015-06-23 11:57:05 +0500
commitd3b7eb7b99ef7dae79c20b5beb63acdfdf6d8046 (patch)
treefa8fa9330a7cf5f0a96c90f1f87eb1c46dc8e570 /mysql-test
parent3e4126e9d6b21d2f330a365b0847999346485863 (diff)
downloadmariadb-git-d3b7eb7b99ef7dae79c20b5beb63acdfdf6d8046.tar.gz
MDEV-7528 GIS: Functions return NULL instead of specified -1 for NULL arguments.
The behaviour required by the standard seems too weird to expect.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/gis.result8
-rw-r--r--mysql-test/t/gis.test7
2 files changed, 14 insertions, 1 deletions
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index b462d7dbbea..2d451de1302 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1111,7 +1111,7 @@ DROP TABLE t0, t1, t2;
#
SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)));
ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)))
-NULL
+-1
#
# BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN
# GEOMETRY FUNCTION ARGUMENTS
@@ -1810,3 +1810,9 @@ disjoint
select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)'),'FF*FF****') as disjoint;
disjoint
0
+#
+# MDEV-7528 GIS: Functions return NULL instead of specified -1 for NULL arguments.
+#
+select ST_IsRing(NULL);
+ST_IsRing(NULL)
+-1
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 2d05d35bb13..60f12a355b4 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -1511,3 +1511,10 @@ select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)'),'
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;
+
+--echo #
+--echo # MDEV-7528 GIS: Functions return NULL instead of specified -1 for NULL arguments.
+--echo #
+
+select ST_IsRing(NULL);
+