[Err]1418 This function has none of DETERMINISTIC

錯誤信息:
[Err] 1418 - 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)
 
緣由:
這是咱們開啓了bin-log, 咱們就必須指定咱們的函數是不是
1 DETERMINISTIC 不肯定的
2 NO SQL 沒有SQl語句
3 READS SQL DATA 只是讀取數據
4 MODIFIES SQL DATA 要修改數據
5 CONTAINS SQL 包含SQL語句

其中在function裏面,只有 DETERMINISTIC, NO SQL 和 READS SQL DATA 被支持。若是咱們開啓了 bin-log, 咱們就必須爲咱們的function指定一個參數。

在MySQL中建立函數時出現這種錯誤的解決方法:
set global log_bin_trust_function_creators=TRUE;
or
set global log_bin_trust_function_creators=1;

[Err]1418 <wbr>This <wbr>function <wbr>has <wbr>none <wbr>of <wbr>DETERMINISTIC,NO <wbr>SQL,or <wbr>R
相關文章
相關標籤/搜索