본문 바로가기

IT tech/Trouble Shooting

This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary log

반응형
SMALL

mysql에 대한 function 관련 에러가 발생했다.

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)

위의 에러문에서 언급된 log_bin_trust_function_creator 옵션은 function, trigger 생성 시 제약을 강제하는 옵션이며, default 상태는 OFF 이다.

이런 OFF 상태일 경우 tirgger 및 function 생성을 못하게 하기 때문에, 이 부분에 대한 설정을 수정해야 한다.

위와 같은 에러가 발생 시,

log_bin_trust_function_creators 옵션을 ON 해준다.

show global variables like 'log_bin_trust_function_creators'; -> OFF 로 되어있을 것이다.
SET GLOBAL log_bin_trust_function_creators=ON;

반응형
LIST