Bug #16179 Ship useful functions with server

Submitted: 4 Jan 2006 10:12 Modified: 27 Jan 2011 13:36
Reporter: [ name withheld ] (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S4 (Feature request)
Version:5.0.17 OS:Windows (WinXP sp2)
Assigned to: CPU Architecture:Any
Tags: qc

[4 Jan 2006 10:12] [ name withheld ]
Description:
Hi, I see that some useful functions like distance between two points are still missing, why don't you implement them as functions/stored procs and ship them with the database?
Like this:
DELIMITER $$

DROP FUNCTION IF EXISTS `test`.`distance` $$
CREATE FUNCTION `test`.`distance` (a POINT, b POINT) RETURNS REAL
COMMENT 'distance'
BEGIN
RETURN round(glength(linestringfromwkb(linestring(asbinary(a), asbinary(b)))));
END $$

DELIMITER ;

How to repeat:
Feature request
[28 Nov 2009 14:35] Valeriy Kravchuk
Thank you for the useful feature request.
[27 Jan 2011 13:36] Alexander Nozdrin
Already in the server (5.6, WL#1326).

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.