A stored function must be declared DETERMINISTIC, NO SQL, or READS SQL DATA when binary logging is enabled.