diff options
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 3 |
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; |