输入这个代码
CREATE FUNCTION F() RETURNS INT(10) RETURN (SELECT 10);
得到这个
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 les safe log_bin_trust_function_creators variable)
我在网上找了一下,需要deterministic,我写上去就能用了,但是我有个疑问,因为网上说,除非子程序被声明为确定性的或者不更改数据,否则创建或者替换子程序将被拒绝。但是我这好像没有对数据进行更改啊?
有谁能解释一下,顺便举一个不需要deterministic也能运行的例子吗,十分感谢。