summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.h
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2020-10-29 01:40:31 +0100
committerAnel Husakovic <anel@mariadb.org>2021-03-27 10:42:39 +0100
commit6769d1a0782f140dcd12c9ced6fda34ac0e41d85 (patch)
tree496207894596a5fbd77a23ba313f8e15ff16b87e /sql/item_geofunc.h
parent48141f3c1787de941d969ad1e6675611b2b650c2 (diff)
downloadmariadb-git-6769d1a0782f140dcd12c9ced6fda34ac0e41d85.tar.gz
MDEV-13467: Feature request: Support for ST_Distance_Sphere()
- Cherry-pick 51e48b9f8981 - vscode gitignore - Thanks Robin Dupret for the review. Reviewed by:daniel@mariadb.org holyfoot@mariadb.com
Diffstat (limited to 'sql/item_geofunc.h')
-rw-r--r--sql/item_geofunc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index a858a9a2d57..efff940ec4b 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -714,6 +714,20 @@ public:
};
+class Item_func_sphere_distance: public Item_real_func
+{
+ double spherical_distance_points(Geometry *g1, Geometry *g2,
+ const double sphere_r);
+public:
+ Item_func_sphere_distance(THD *thd, List<Item> &list):
+ Item_real_func(thd, list) {}
+ double val_real();
+ const char *func_name() const { return "st_distance_sphere"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sphere_distance>(thd, mem_root, this); }
+};
+
+
class Item_func_pointonsurface: public Item_geometry_func
{
String tmp_value;