summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis-precise.test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2011-07-13 14:57:27 +0500
committerAlexey Botchkov <holyfoot@askmonty.org>2011-07-13 14:57:27 +0500
commit90c4df7a4af542707d884e53990827672bb8feea (patch)
treefcf24b0b49e8dc8e69bf17a6c3937347bf40cb9d /mysql-test/t/gis-precise.test
parente7c9f52fd960440614c30c3f852bf74f1febe6b3 (diff)
downloadmariadb-git-90c4df7a4af542707d884e53990827672bb8feea.tar.gz
Fix for bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION.
Second smaller hole in the polygon got link to the bigger one as it's the outer ring. Fixed by specifying the outer ring explicitly. per-file comments: mysql-test/r/gis-precise.result Fix for bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION. test result updated. mysql-test/t/gis-precise.test Fix for bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION. test case added. sql/gcalc_tools.cc Fix for bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION. specify the outer ring explicitly in the get_polygon_result parameter. sql/gcalc_tools.h Fix for bug #804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION. add the outer ring as a parameter to the get_polygon_result.
Diffstat (limited to 'mysql-test/t/gis-precise.test')
-rw-r--r--mysql-test/t/gis-precise.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test
index bf36e6e9628..bb223b685e4 100644
--- a/mysql-test/t/gis-precise.test
+++ b/mysql-test/t/gis-precise.test
@@ -177,3 +177,13 @@ SELECT AsText(ST_SYMDIFFERENCE(
(6 3, 3 4, 1 1, 9 9, 9 0, 8 4, 9 9))'),
Envelope(GeometryFromText('MULTIPOINT(7 9, 0 0, 3 7, 1 6, 0 0)'))));
+#bug 804266 Memory corruption/valgrind warning/crash in move_hole() with ST_UNION
+
+SELECT AsText(ST_UNION(
+ MultiPolygonFromText('MULTIPOLYGON(((9 9, 7 9, 1 1, 9 9)),
+ ((2 2, 1 2, 3 3, 2 2, 2 2)),
+ ((0 0, 7 5, 9 6, 0 0)),
+ ((7 7, 5 7, 1 5, 7 1, 7 7)))'),
+ MultiPolygonFromText('MULTIPOLYGON(((2 2, 2 2, 1 5, 2 7, 2 2)),
+ ((0 5, 3 5, 3 0, 0 0, 0 5), (1 1, 2 1, 2 4, 1 4, 1 1)))')));
+