summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2011-09-21 13:26:21 +0500
committerAlexey Botchkov <holyfoot@askmonty.org>2011-09-21 13:26:21 +0500
commitd0f2e1e55176c7f674832444ea174c2445058ef7 (patch)
treeea09c51b66cf5777b46c34d5ef028bf5c7cddc8f /sql/item_geofunc.cc
parent6b64baf3b9c8a6c33dd47be62c0b73ab12157760 (diff)
downloadmariadb-git-d0f2e1e55176c7f674832444ea174c2445058ef7.tar.gz
bug 855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
per-file comments: mysql-test/r/gis.result bug 855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed. test result updated. mysql-test/t/gis.test bug 855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed. test case added. sql/item_geofunc.cc bug 855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed. geom_length() call fixed. sql/spatial.cc bug 855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed. Geometry_collection::geom_length implemented. sql/spatial.h bug 855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed. Geometry_collection::geom_length declaration added.
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r--sql/item_geofunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 2c3facb49c8..e490643f88b 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -1719,12 +1719,13 @@ double Item_func_glength::val_real()
String *swkb= args[0]->val_str(&value);
Geometry_buffer buffer;
Geometry *geom;
+ const char *end;
null_value= (!swkb ||
!(geom= Geometry::construct(&buffer,
swkb->ptr(),
swkb->length())) ||
- geom->geom_length(&res));
+ geom->geom_length(&res, &end));
return res;
}