自定义mysql函数时报错,[Err] 1418 - This function has none of DETERMINISTIC......

  今天在我执行自定义mysql函数的SQL时发生了错误,SQL如下:

/**
自定义mysql函数 getChildList
*/
delimiter //
CREATE FUNCTION `pengwifi_wifi`.`getChildList`(rootId INT)
RETURNS varchar(1000)

BEGIN
DECLARE sTemp VARCHAR(1000);
DECLARE sTempChd VARCHAR(1000);

SET sTemp = ‘$‘;
SET sTempChd =cast(rootId as CHAR);

WHILE sTempChd is not null DO
SET sTemp = concat(sTemp,‘,‘,sTempChd);
SELECT group_concat(id) INTO sTempChd FROM hui_class where FIND_IN_SET(parent_id,sTempChd)>0;
END WHILE;
RETURN sTemp;
END
//

报错信息:[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)

解决方法:set global log_bin_trust_function_creators=TRUE;

时间: 2025-01-12 00:51:55

自定义mysql函数时报错,[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_creator【s

问题:执行创建函数的sql文件报错如下: [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) 解决办法也有两种, 第一种是在创建子程

[Err]1418 This function has none of DETERMINISTIC,NO SQL,or R

错误信息: [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, 我们就必须指定我们的函数是否

[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, 我们就必须指定我们的函数是否

mysql执行SQL语句时报错:[Err] 3 - Error writing file '/tmp/MYP0G1B8' (Errcode: 28 - No space left on device)

问题描述: 今天一同事在mysql中执行SQL语句的时候,报了/tmp空间不足的问题,报错如下: [SQL] SELECT f.prov as 字段1, MAX( CASE f.flag_name WHEN '字段1' THEN f.num ELSE 0 END ) AS '字段1', MAX( CASE f.flag_name WHEN '店员量' THEN f.num ELSE 0 END ) AS '字段1', MAX( CASE f.flag_name WHEN '字段1' THEN f

Python2爬虫获取的数据存储到MySQL中时报错"Incorrect string value: '\\xE6\\x96\\xB0\\xE9\\x97\\xBB' for column 'new' at row 1"的解决办法

由于一直使用python3进行编码,在使用Python2时,将爬虫数据连接数据库进行存储时,出现如上的报错,经查资料 是数据库编码问题. 如下转自:http://www.cnblogs.com/liuzhixin/p/6274821.html 的博客,在此感谢博主的慷慨分享之情. 错误原因:我们可以看到错误提示中的字符0xF0 0x9F 0x98 0x84 ,这对应UTF-8编码格式中的4字节编码(UTF-8编码规范).正常的汉字一般不会超过3个字节,为什么为出现4个字节呢?实际上是它对应的是智

特殊符号存入mysql数据库时报错:Incorrect string value: '\xF0\x9F\x98\x84\xF0\x9F的解决方法

问题描述:从新浪微博抓取消息保存到MySQL数据中,对应数据库字段为varchar,字符编码utf-8.部分插入成功,部分插入失败,报错如标题. 在网上查询,有人说是编码问题,建议修改编码格式,比如改成gbk,UTF-8,blob等等,但是几乎没有人给出更详细的答案.在一个英文网站上,才发现真正错误的原因.链接1 链接2 错误原因:我们可以看到错误提示中的字符0xF0 0x9F 0x98 0x84 ,这对应UTF-8编码格式中的4字节编码(UTF-8编码规范).正常的汉字一般不会超过3个字节,为

mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)

mysql启动报错Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 查看mysql错误日志也没有写入. 最后发现是selinux打开,汗…… 参考 mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)

解决mysql插入数据报错[Err] 1146 - Table 'performance_schema.session_status' doesn't exist

解决办法:1.打开cmd 执行命令cd/ 进入C盘根目录2.dir 查看C盘根目录下文件夹  找到 Program Files文件夹3.cd Program Files 进入该文件夹下 再输入dir 查看该文件夹下所有文件夹4.cd MySQL 进入该文件夹  再输入dir 查看该文件夹下所有文件夹5.cd MySQLServer 5.7 进入该文件夹  再输入dir 查看该文件夹下所有文件夹6.cd bin 进入该文件夹  7.输入mysql_upgrade -u root -p --forc

navicat for mysql 链接时报错:1251-Client does not support authentication protocol requested by serve

navicat for mysql 链接时报错:1251-Client does not support authentication protocol requested by serve 解决方法: mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; mysql> select host,user,plugin,authentication_string from mysql.use