summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
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 631b63812b5..2c3facb49c8 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -867,7 +867,8 @@ int Item_func_spatial_rel::func_touches()
if (cur_func)
{
area= scan_it.get_h() *
- ((ti.rb()->x - ti.lb()->x) + (ti.rt()->x - ti.lt()->x));
+ ((scan_it.get_sp_x(ti.rb()) - scan_it.get_sp_x(ti.lb())) +
+ (scan_it.get_sp_x(ti.rt()) - scan_it.get_sp_x(ti.lt())));
if (area > GIS_ZERO)
{
result= 0;