Is there anyway to make the execute statement that is a create function?

I tried this and it's giving me an error:

Code:
DELIMITER $$

CREATE PROCEDURE `createfunction` (function longtext)
BEGIN

	DECLARE function_code LONGTEXT;


	SET function_code = 
	'CREATE FUNCTION `remove_accents`(`str` TEXT)
	RETURNS text CHARSET utf8
    NO SQL
    DETERMINISTIC
    SQL SECURITY INVOKER
	BEGIN
    DECLARE test LONGTEXT;
	set test = 8;
	return test;
	END';

	call EXECUTE_QUERY(function_code);
END
Giving me this error:
Error Code: 1295. This command is not supported in the prepared statement protocol yet

Any ideas?

Thanks