Chinaunix首页 | 论坛 | 博客
  • 博客访问: 448704
  • 博文数量: 135
  • 博客积分: 4177
  • 博客等级: 上校
  • 技术积分: 1145
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-13 17:16
文章分类

全部博文(135)

文章存档

2011年(5)

2010年(4)

2009年(26)

2008年(25)

2007年(29)

2006年(42)

2005年(4)

分类: Mysql/postgreSQL

2007-07-25 19:23:09

今天要写一个函数.但没有办法建提示错误如下:
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记住以后要添加此条
;
阅读(1219) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~