본문 바로가기
MariaDB

[#9] MariaDB에서 Function이 생성되지 않는다?

by 김뽀씨 2017. 10. 30.

MariaDB에서 Function 이 생성되지 않는다?

DB에 문제가 생겨서 백업받은 파일로 복구를 하고

추가적으로 Function을 생성하는 순간!!!!

다음과 같은 에러가!!!

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'; 

이 결과가 OFF 라면 만들어지지 않는다!

 

이럴 경우 다음과 같은

SET GLOBAL log_bin_trust_function_creators = 1; // ON

SET GLOBAL log_bin_trust_function_creators = 0; // OFF

 

이렇게 설정해주면 끝!