This function has none of DETERMINISTIC, NO SQL, or READS SQL

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值