Solución Error 1418 Workbench

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)

-Ejecutar en Workbench:

set global log_bin_trust_function_creators = 1;

o añadir DETERMINIST, NO SQL o READS SQL DATA a la sentencia sql.
Ejemplo con DETERMINIST:

DELIMITER |

CREATE FUNCTION ejercicio___5(cat1 INT, cat2 INT)
RETURNS FLOAT
deterministic
BEGIN
DECLARE h FLOAT;
SET cat1=power(cat1,2);
SET cat2=power(cat2,2);
SET h=cat1+cat2;
SET h=sqrt(h);
RETURN h;
END; |

DELIMITER ;
La Coruña, España Correo contacto@pc-solucion.es