CREATE FUNCTION return_distance (lat_a DOUBLE, long_a DOUBLE, lat_b DOUBLE, long_b DOUBLE) RETURNS DOUBLE BEGIN DECLARE distance DOUBLE; SET distance = SIN(RADIANS(lat_a)) * SIN(RADIANS(lat_b)) + COS(RADIANS(lat_a)) * COS(RADIANS(lat_b)) * COS(RADIANS(long_a - long_b)); RETURN((DEGREES(ACOS(distance))) * 69.09); END
Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.