2010년 1월 31일 일요일

Function 생성시 error

< 문제 현상 >

mysql> delimiter |
mysql> CREATE FUNCTION bonjour (s CHAR(20)) RETURNS CHAR(50)
-> RETURN CONCAT('Bonjour, ',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)




< 문제 해결 >

show global variables like 'log_bin_trust_function_creators';

-> 옵션이 ON인지 OFF인지 알수 있다.


SET GLOBAL log_bin_trust_function_creators = 1; 하면 ON
SET GLOBAL log_bin_trust_function_creators = 0; 하면 OFF


ON일때만 function을 생성할 수 있는 것입니다.

출처::http://blog.daum.net/z-dream/16804235
[출처] MySQL 5.X에서 function 정의시 오류 발생...|작성자 앙마

댓글 없음:

댓글 쓰기