diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2011-07-05 19:42:35 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2011-07-05 19:42:35 +0500 |
commit | f3b850a7b52b5947eb694b5a1f73d0425de5bb0e (patch) | |
tree | 8a211b1bb2d3b9502b2bb05309285832c6a9d8a8 /mysql-test/t/gis-precise.test | |
parent | 7f55ea121191131723c99889943f8a278c5a7b4b (diff) | |
download | mariadb-git-f3b850a7b52b5947eb694b5a1f73d0425de5bb0e.tar.gz |
bug #804305 Crash in wkb_get_double with ST_INTERSECTION.
That crash happened with the complicated topology of the result.
If we found a hole in a polygon whose outside border was already
found, we need to paste the hole right after it and respectively
shift polygons after it. Also we need to update poly_position fields
in these polygons. That last thing wasn't properly done that led to the
crash.
To fix that we keep the list of the found polygons and update the
poly_positions that are bigger or equal to where we placed the next hole.
per-file comments:
mysql-test/r/gis-precise.result
bug #804305 Crash in wkb_get_double with ST_INTERSECTION.
test result updated.
mysql-test/t/gis-precise.test
bug #804305 Crash in wkb_get_double with ST_INTERSECTION.
test result added.
sql/gcalc_tools.cc
bug #804305 Crash in wkb_get_double with ST_INTERSECTION.
keep the list of the found polygons and update their poly_position fields respectively.
sql/gcalc_tools.h
bug #804305 Crash in wkb_get_double with ST_INTERSECTION.
Gcalc_result_receiver::move_hole interface changed.
Diffstat (limited to 'mysql-test/t/gis-precise.test')
-rw-r--r-- | mysql-test/t/gis-precise.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test index 72ba6b748be..87b56dc0040 100644 --- a/mysql-test/t/gis-precise.test +++ b/mysql-test/t/gis-precise.test @@ -121,3 +121,12 @@ SELECT Round(ST_Area(ST_BUFFER(MultipointFromText('MULTIPOINT(7 7,3 7,7 2,7 4 ,7 #bug 801212 Assertion with ST_INTERSECTION on NULL values SELECT ST_INTERSECTION(NULL, NULL); +#bug 804305 Crash in wkb_get_double with ST_INTERSECTION +SELECT ASTEXT(ST_INTERSECTION( + MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)), + ((0 5,3 5,3 0,0 0,0 1,2 1,2 2,0 2,0 5), (1 3,2 3,2 4,1 4,1 3)), + ((2 2,5 2,4 4,2 8,2 2)))'), + MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 4,2 5,3 5)), + ((2 2,9 2,0 2,2 6,2 2)), + ((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), + ((9 9,6 8,7 0,9 9)))'))); |