This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary
Aug 27, 2009
Today I was struggling while creating a funtion on mysql database. It can be executed with the root privilageds but shows an error massage when it is executed with low privilages. The error massage is shown bellow.
>>The current conditions on the use of stored functions in MySQL 5.0 can be summarized as follows. These conditions do not apply to stored procedures and they do not apply unless binary logging is enabled.
ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its>>To avoid this error you must do one of the following.
declaration and binary logging is enabled (you *might* want to use the less safe
log_bin_trust_function_creators variable)
- Specify the one or more of DETERMINISTIC, NO SQL, and/or READS SQL DATA key words in your stored function definition.
- Set the value of "log_bin_trust_function_creators" to '1',
(mysql> SET GLOBAL log_bin_trust_function_creators = 1;)
>>The current conditions on the use of stored functions in MySQL 5.0 can be summarized as follows. These conditions do not apply to stored procedures and they do not apply unless binary logging is enabled.
- To create or alter a stored function, you must have the SUPER privilege, in addition to the CREATE ROUTINE or ALTER ROUTINE privilege that is normally required.
- When you create a stored function, you must declare either that it is deterministic or that it does not modify data. Otherwise, it may be unsafe for data recovery or replication.
Labels:
DETERMINISTIC,
Mysql

hi
it's so useful for me.
good post.. solved my problem in seconds. Thanks
Wow it useful for me.
thanks alot
in which file we r making those changes? is it in db or mysql ?
mysql
can u please specify please I am new to this. is it in my.ini file? thanks in advance
no.. it is not in the ini file... login to mysql using terminal. If you use windows go to the mysql client and execute command. If you use linux you can directly login to mysql using terminal.
thanks a lot
thanks
thanks it works!
it works for me, thanks.
It help me a lot, thank you.
NICE
Very Helpful post
thank you your post, it is useful for me!
Thanks for posting the quick fix....
thanks ..