summaryrefslogtreecommitdiff
path: root/sql/spatial.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2011-09-22 18:53:36 +0500
committerAlexey Botchkov <holyfoot@askmonty.org>2011-09-22 18:53:36 +0500
commit5123f59ed2b363ac25fdef374af607f93ec9d762 (patch)
treea5cca669b6ba71be91edb191f4c4da015d254e64 /sql/spatial.cc
parentd0f2e1e55176c7f674832444ea174c2445058ef7 (diff)
downloadmariadb-git-5123f59ed2b363ac25fdef374af607f93ec9d762.tar.gz
fixed bugs
855485 ST_CROSSES returns different result than PostGIS for overlapping polygons 855487 ST_WITHIN returns wrong result for partially overlapping polygons 855492 ST_WITHIN returns TRUE on point on the edge of a polygon 855497 ST_ENVELOPE of GEOMETRYCOLLECTION EMPTY returns NULL and not GEOMETRYCOLLECTION EMPTY 855503 ST_EQUALS reports TRUE between a POLYGON and a MULTILINESTRING 855505 ST_TOUCHES reports TRUE for intersecting polygon and linestring Changed the way weird functions like Crosses or Touches treated. Added BORDER handling to the Gcalc_function. per-file comments: mysql-test/r/gis-precise.result GIS bugs fixed. test result updated. mysql-test/t/gis-precise.test GIS bugs fixed. test cases added. sql/gcalc_slicescan.h GIS bugs fixed. sql/gcalc_tools.cc GIS bugs fixed. sql/gcalc_tools.h GIS bugs fixed. sql/item_create.cc GIS bugs fixed. sql/item_geofunc.cc GIS bugs fixed. sql/item_geofunc.h GIS bugs fixed. sql/spatial.cc GIS bugs fixed.
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r--sql/spatial.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index 15dc42441a8..d18600dd7de 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -2519,6 +2519,12 @@ int Gis_geometry_collection::store_shapes(Gcalc_shape_transporter *trn) const
n_objects= uint4korr(data);
data+= 4;
+ if (!n_objects)
+ {
+ trn->empty_shape();
+ return 0;
+ }
+
if (trn->start_collection(n_objects))
return 1;