创建函数出错ERROR 1418 (HY000) 解决

1324阅读 0评论2007-07-25 hb_li_520
分类:Mysql/postgreSQL

今天要写一个函数.但没有办法建提示错误如下:
mysql> CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR(50)
    -> RETURN CONCAT('Hello, ',s,'!');
    -> //
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_creators variable)
 
解决方式:(编缉my.cnf,添加如下)
[mysqld]
log_bin_trust_routine_creators = 1
 
 
此为mysql的一个bug记住以后要添加此条
;
上一篇:很通俗的inner join, left join,right join
下一篇:什么是元数据?