Whenever I run this code:
SET GLOBAL log_bin_trust_function_creators=TRUE;
DROP FUNCTION IF EXISTS GreaterCircleNm;
DELIMITER go
CREATE FUNCTION GreaterCircleNm( lat1 FLOAT, lon1 FLOAT, lat2 FLOAT, lon2 FLOAT ) RETURNS float
BEGIN
DECLARE pi, q1, dist FLOAT;
SET pi = PI();
SET lat1 = lat1 * pi / 180;
SET lon1 = lon1 * pi / 180;
SET lat2 = lat2 * pi / 180;
SET lon2 = lon2 * pi / 180;
SET q1 = ACOS(sin(lat1)*sin(lat2)+COS(lat1)*COS(lat2)*COS(lon1-lon2));
SET dist = q1*180*60/pi;
RETURN dist;
END;
go
DELIMITER ;
I get an error telling me I don't have super privileges. My hosting provider already told me that it is not possible for me to (1) get those privileges or (2) have them run the code. That leaves me with option (3) which is to remove SET GLOBAL log_bin_trust_function_creators=TRUE;
while still creating the function. I'm not sure if this is possible, but I'd appreciate any help.