以下是关于 MySQL 中 DETERMINISTIC、NO SQL 和 READS SQL DATA 的详细解析: 1. DETERMINISTIC 定义与作用 • 作用:标记函数或存储过程为确定性,即相同的输入参数总是返回相同的结果。 • 默认值:MySQL 5.0.0 及以上版本默认值为 NO
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) 我本机的错误: {"This function has none of DETERMINISTIC, NO SQL, or RE...
### 1.2 错误信息含义深度解析 在创建或使用存储函数时,有时会遇到以下错误信息:“This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration”。这个错误信息表明,函数的声明中缺少了必要的特性声明。MySQL 要求每个存储函数必须明确声明其行为特性,以确保数据库引擎能够正确地处理和...
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, 我们就必须为我们...
+---+ 1. 2. 3. 4. 5. 6. 定义函数 -- 最简单的函数 create function foo() returns int return 10; 1. 2. 3. 报错 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...
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, 我们就必须为我们...
在mySQL8.0.23创建存储函数时,出现一下错误提示: 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) 此函数的声明中没有DETERMINISTIC,NO SQL或READS ...
方法/步骤 1 一:翻译后的具体的报错信息如下 错误代码:1418此函数在其声明中没有DETERMINISTIC,NO SQL或READS SQL DATA,并且启用了二进制日志记录(您可能*希望使用不太安全 的 log_bin_trust_function_creators变量). 从这里可以看出,"log_bin_trust_function_creators "是一个变量,并且是一个不安全的...
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) 解决办法: 主从上都设置 set global log_bin_trust_function_creators=1。
When I create a function in MySQL 8, I get an error if I don't specify one of the characteristics DETERMINISTIC, NO SQL, or READS SQL DATA. The error is: Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is ...