Im using mysqlWorkbench
I have followed example work supplied by my tutor and suggestions from other users on this sight but am now recieving a 1418 error when trying to create the function, as shown in the following:
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) 0.00069 sec
The function is as follows:
DELIMITER £
CREATE FUNCTION Calc(ReferenceNumber INTEGER)
RETURNS INTEGER
BEGIN
DECLARE NUMCATS INTEGER;
SELECT SUM(BOOKCAT.Ref = ReferenceNumber) INTO NUMCATS
FROM CATTERY.BOOKCAT;
RETURN NUMCATS;
END £
DELIMITER ;
select calc(7);
Let me know what i am doing wrong and how to correct it, thanks.