From 0e6c889c83bcf6c37526e3a3fee192bb59cab92e Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Mon, 4 Jul 2011 16:03:36 +0500 Subject: bug #801199 Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT Collections were treated mistakenly, so the counter for the final UNION operation received the wrong value. As a fix we implement Item_func_buffer::Transporter::start_collection() method, where we set the proper operation and the operand counter. start_poly() and start_line() were also modified to function correctly for the polygon as a part of a collection. per-file comments: mysql-test/r/gis-precise.result bug #801199 Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT test result updated. mysql-test/t/gis-precise.test bug #801199 Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT test case added. sql/item_geofunc.cc bug #801199 Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT start_collection() implemented. sql/item_geofunc.h bug #801199 Infinite recursion in Gcalc_function::count_internal with ST_BUFFER over MULTIPOINT Item_func_buffer::Transporter::start_collection() defined. --- mysql-test/r/gis-precise.result | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/r/gis-precise.result') diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result index 48c00c4a468..e4cc9028236 100644 --- a/mysql-test/r/gis-precise.result +++ b/mysql-test/r/gis-precise.result @@ -212,3 +212,6 @@ GEOMETRYCOLLECTION(POLYGON((0 0,1 9,8 2,0 0),(2 2,2 7,3 2,2 2)),LINESTRING(0 0,5 SELECT astext(ST_BUFFER(LineStringFromText('LINESTRING(0 0,1 1)'),0)); astext(ST_BUFFER(LineStringFromText('LINESTRING(0 0,1 1)'),0)) LINESTRING(0 0,1 1) +SELECT Round(ST_Area(ST_BUFFER(MultipointFromText('MULTIPOINT(7 7,3 7,7 2,7 4 ,7 7)'), 3)), 5); +Round(ST_Area(ST_BUFFER(MultipointFromText('MULTIPOINT(7 7,3 7,7 2,7 4 ,7 7)'), 3)), 5) +78.68426 -- cgit v1.2.1