This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary
This warning is rising because as the default MySQL server supports replication. This means that BINARY LOGGING is turned ON.
So, there is a replication log that contains all the changes that is made to the database.
Unfortunately, MySQL is not checking the statements that are stored in the SPs or UDFs. The server can't say, whether the procedure changes the data in the database or not.
That is why MySQL server asks for the explicit specification of the operations that are performed inside the SP or UDF, if the binary logging is on.
This doesn't mean that the procedure will be prohibited to execute the update statements if it is defined as DETERMINISTIC or READS SQL DATA or NO SQL. The characteristics are advisory only.
So, If you are not replicating your server and the binary logging is on as the default, just turn it off to not receive the warning.
Or, if you are replicating the server then you can:
1. Set the SUPER privileges for your user;
2. Change the system variable for the server like:
mysql> SET GLOBAL log_bin_trust_function_creators = 1 ;
3. Set this variable by using the --log-bin-trust-function-creators=1 option when starting the server.
分享到:
相关推荐
ERROR 1418 (HY000): 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_...
his function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
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)
代码如下: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_...
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled 错误解决办法 原创文章 1获赞 1访问量 11 关注 私信 展开阅读全文
mysql> delimiter // mysql> CREATE FUNCTION Uf_new_product_id() -> RETURNS VARCHAR(32) ...ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its
出错信息: 代码如下:ERROR 1418 (HY000): 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_...
ERROR 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 ...
ERROR 1418 (HY000): 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_...