< 문제 현상 >

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/16803946
by 널부러 2009. 4. 28. 13:56