summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis-precise.test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2011-06-30 18:18:27 +0500
committerAlexey Botchkov <holyfoot@askmonty.org>2011-06-30 18:18:27 +0500
commit4f49cdf8d303b431343bbc77428169fdfcaae34c (patch)
tree81fb0a27ab947f77fd74051cbac75846dfbd2f53 /mysql-test/t/gis-precise.test
parentb826c888417e258dc0da6b6c0d011960db38f4b9 (diff)
downloadmariadb-git-4f49cdf8d303b431343bbc77428169fdfcaae34c.tar.gz
fix for bug #801243 Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION
If the result contains a polygon with a hole, consequitive shapes weren't calculated properly, as the hole appeared as shape in the result, but actually it's a single shape with the surrounding polygon. It's more natural to use the size of the result as a border instead of the number of resulting shapes. per-file comments: mysql-test/r/gis-precise.result fix for bug #801243 Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION test result updated. mysql-test/t/gis-precise.test fix for bug #801243 Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION test case added. sql/spatial.cc fix for bug #801243 Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION check the data lenght instead of number of shapes. sql/spatial.h fix for bug #801243 Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION check the data lenght instead of number of shapes.
Diffstat (limited to 'mysql-test/t/gis-precise.test')
-rw-r--r--mysql-test/t/gis-precise.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test
index f37249aedee..b5c54c6b0c4 100644
--- a/mysql-test/t/gis-precise.test
+++ b/mysql-test/t/gis-precise.test
@@ -105,3 +105,9 @@ select st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('p
SELECT ST_Equals(PolyFromText('POLYGON((67 13, 67 18, 67 18, 59 18, 59 13, 67 13) )'),PolyFromText('POLYGON((67 13, 67 18, 59 19, 59 13, 59 13, 67 13) )')) as result;
SELECT ST_Equals(PolyFromText('POLYGON((67 13, 67 18, 67 18, 59 18, 59 13, 67 13) )'),PolyFromText('POLYGON((67 13, 67 18, 59 18, 59 13, 59 13, 67 13) )')) as result;
SELECT ST_Equals(PointFromText('POINT (12 13)'),PointFromText('POINT (12 13)')) as result;
+
+# bug #801243 Assertion `(0)' failed in Gis_geometry_collection::init_from_opresult on ST_UNION
+
+SELECT astext(ST_UNION (
+ PolyFromText('POLYGON(( 2 2 ,3 2,2 7,2 2),( 0 0,8 2,1 9,0 0))'),
+ ExteriorRing( Envelope( MultiLineStringFromText('MULTILINESTRING((3 4,5 3),(3 0,0 5))')))));