在mysql5.0版本中创建存储过程时,出现:
1418 - This function has none of DETERMINISTIC, NOSQL, or READS SQL DATA in its declaration and binary logging isenabled (you *might* want to use the less safelog_bin_trust_function_creators variable)错误。
原因是开启了log-bin日志,创建函数时,函数中没有包含DETERMINISTIC, NOSQL和 READS SQL DATA声明,即没有涉及修改数据。
解决:
1、查出log_bin_trust_function_creators的值
mysql--> show variables like 'log_bin_trust_function_creators'
log_bin_trust_function_creators OFF
2、修改该值为ON
mysql-->set global log_bin_trust_function_creators=1;
解决问题,不过要使该参数重启之后不失效,要在my.cnf修改为ON