Database/MySQL&Mariadb

[ERROR-1418] 함수 생성 오류

오잉OoO 2021. 3. 5. 14:51

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 less safe log_bin_trust_function_creators variable)

함수 만들 때 에러가 발생하였다.
log_bin_trust_function_creators 변수의 값이 OFF일 경우 ON으로 변경해주면 된다.

1) log_bin_trust_function_creators 변수 확인
MariaDB > show variables like 'log_bin%';

 

2) log_bin_trust_function_creators 변수 상태값 변경
MariaDB > SET GLOBAL log_bin_trust_function_creators='ON';