Forums

create mysql function fails with

Hi,

I'm creating a MYSQL function:

DROP FUNCTION IF EXISTS F_TEST;
DELIMITER $$
CREATE DEFINER=CURRENT_USER FUNCTION F_TEST( input TEXT ) RETURNS TEXT CHARSET utf8 DETERMINISTIC
BEGIN
    RETURN INPUT;
END$$
DELIMITER ;

But creation fails with this message:

ERROR 1419 (HY000) at line 9: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

The same error occurs even if I prefix function name with username$databasename.

Can you tell me what is going wrong ?

Best regards

/

We do not support user defined functions for MySQL, because that function would be shared with all other users.

You would have to use postgres for that. (for postgres you get your own server, and so can have admin privileges on it)