This function has none of DETERMINISTIC, NO SQL解决办法
来源:互联网 发布:杭创软件 编辑:程序博客网 时间:2024/06/02 17:18
This function has none of DETERMINISTIC, NO SQL解决办法
创建存储过程时
出错信息:
ERROR 1418 (HY000): 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)
原因:
这是我们开启了bin-log, 我们就必须指定我们的函数是否是
1 DETERMINISTIC 不确定的
2 NO SQL 没有SQl语句,当然也不会修改数据
3 READS SQL DATA 只是读取数据,当然也不会修改数据
4 MODIFIES SQL DATA 要修改数据
5 CONTAINS SQL 包含了SQL语句
其中在function里面,只有 DETERMINISTIC, NO SQL 和 READS SQL DATA 被支持。如果我们开启了bin-log, 我们就必须为我们的function指定一个参数。
解决方法:
SQL codemysql>showvariableslike 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name |Value|
+---------------------------------+-------+
| log_bin_trust_function_creators|OFF |
+---------------------------------+-------+
mysql>setgloballog_bin_trust_function_creators=1;
mysql>showvariableslike 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name |Value|
+---------------------------------+-------+
| log_bin_trust_function_creators|ON |
+---------------------------------+-------+
这样添加了参数以后,如果mysqld重启,那个参数又会消失,因此记得在my.cnf配置文件中添加:
log_bin_trust_function_creators=1
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL解决办法 【转】
- This function has none of DETERMINISTIC, NO SQL解决办法
- This function has none of DETERMINISTIC, NO SQL错误解决办法
- This function has none of DETERMINISTIC, NO SQL的解决
- Linux C++备忘录
- @RequestMapping注解的简单学习 和 @requestParam @PathVariable
- 魔幻计时器
- windows程序设计_第6章_键盘——学习笔记
- 数据仓库基本概念-事实表的三种分类
- This function has none of DETERMINISTIC, NO SQL解决办法
- Xcode调试技巧
- ASP.NET中获取URL重写前的原始地址详解
- 将拥有相同字段的数据项合并
- jsonArray 和 JavaBean互换
- 算法总结:判断一个数是否为素数
- 遥控器待机键的添加
- @RequestMapping 之 @ModelAttribute <不懂 待补>
- ubuntu查看并杀死进程