summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2015-03-15 11:17:50 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2015-03-15 11:17:50 +0400
commitca3041883725393baa6c645050ef926d782eb3a8 (patch)
treeeda5c27fd68b48d5f8f41a15a26dc611b1ffbb1a /sql/item_geofunc.cc
parenta21ef88d2a358904f0cdf9cadc701cb263b5e317 (diff)
downloadmariadb-git-ca3041883725393baa6c645050ef926d782eb3a8.tar.gz
MDEV-7514 GIS: PointOnSurface returns NULL instead of the point.
Need to take into account cases of a polygon shaped as a very thin line.
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r--sql/item_geofunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 7f63388fc81..753bae89ca4 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -2346,7 +2346,7 @@ String *Item_func_pointonsurface::val_str(String *str)
}
x0= scan_it.get_sp_x(pprev);
px= scan_it.get_sp_x(pit.point());
- if (px - x0 > GIS_ZERO)
+ if (fabs(px - x0) > GIS_ZERO)
{
if (scan_it.get_h() > GIS_ZERO)
{