今天用命令创建函数,

报错

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)

原因是:

当二进制日志启用后,这个log_bin_trust_function_creators变量就会启用。它控制是否可以信任存储函数创建者,不会创建写入二进制日志引起不安全事件的存储函数。如果设置为0(默认值),用户不得创建或修改存储函数,除非它们具有除CREATE ROUTINE或ALTER ROUTINE特权之外的SUPER权限。 设置为0还强制使用DETERMINISTIC特性或READS SQL DATA或NO SQL特性声明函数的限制。 如果变量设置为1,MySQL不会对创建存储函数实施这些限制。 此变量也适用于触发器的创建

所以需要加一条命令

set global log_bin_trust_function_creators=TRUE;   -- 设置,
delimiter ;;
CREATE FUNCTION concatFeatureJson(v_status tinyint, v_column_json VARCHAR(25)) RETURNS varchar(255)
begin
declare v_sql varchar(2000);
SELECT group_concat(concat('JSON_EXTRACT(',v_column_json,',','\'.$',feature_short_from_name,'\') ',feature_short_from_name))
into v_sql from feature_space where status = v_status ; RETURN v_sql;
end
;;
delimiter ;

mysql 5.7 创建函数报错,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_creat的更多相关文章

  1. MySQL 创建函数报错 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

    问题描述 通过Navicat客户端,创建MySQL函数(根据的当前节点查询其左右叶子节点)时报错,报错信息如下: This function has none of DETERMINISTIC, NO ...

  2. mysql 创建函数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_f

    mysql 创建函数的时候 报错 ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL D ...

  3. [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 ...

  4. 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 reads sql data in its declaration and binary loggi ...

  5. mysql----------mysql5.7.11导入sql文件时报错This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled

    1.导入sql文件出现如下错误. [Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in ...

  6. hibernate调用mysql自己手动创建函数报错

    split为自己手动在mysql中创建的函数,在hibernate调用时出错,解决方案如下: jdbc调用可以.不用改hibernate的方言. 正常的为:

  7. 开启bin-log日志mysql报错:This function has none of DETERMINISTIC, NO SQL解决办法

    开启bin-log日志mysql报错:This function has none of DETERMINISTIC, NO SQL解决办法: 创建存储过程时 出错信息: ERROR 1418 (HY ...

  8. MySQL使用Union创建视图报错

    mysql> select * from test_main; +----+-------+ | id | value | +----+-------+ |  1 | ONE   | |  2  ...

  9. mysql 5.7 创建用户报错ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value

    如: INSERT INTO user (host, user, authentication_string, select_priv, insert_priv, update_priv) VALUE ...

随机推荐

  1. service mesh学习规划

    istio go语言 谷歌开发 现有产品功能(每个功能具体支持哪些方式,优缺点) 服务注册发现 流量劫持 路由 负载均衡 熔断降级 流量控制(限流.流量分配) 重试机制 日志管理 支持的协议 监控(健 ...

  2. pg_controldata - 显示一个 PostgreSQL 集群的控制信息

    SYNOPSIS pg_controldata [ datadir] DESCRIPTION 描述 pg_controldata 打印那些在 initdb 过程中初始化的信息,比如表版本和服务器的区域 ...

  3. poj 2187 Beauty Contest(平面最远点)

    Beauty Contest Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 24431   Accepted: 7459 D ...

  4. JSON.stringify常见用法

    转摘于其他博客 var data =[ { name: "金",sex:"1",age:26 }, { name: "才",sex:&quo ...

  5. 自动化测试平台环境docker部署

    参考资料:testin云测 https://www.testin.cn接口自动化测试平台:http://120.79.232.23星云测试 http://www.threadingtest.com腾讯 ...

  6. BZOJ 3729 GTY的游戏

    伪ETT? 貌似就是Splay维护dfn = = 我们首先观察这个博弈 这个博弈直接%(l+1)应该还是很显然的 因为先手怎么操作后手一定能保证操作总数取到(l+1) 于是就变成阶梯Nim了 因为对于 ...

  7. Rabbit给单独的消息设置超时

    /** * 发送消息 * @param user */@RequestMapping(value = prefix+"/setRabbitMessage", method = Re ...

  8. No module named flask 导包失败,Python3重新安装Flask模块

    在部署环境过程中,通过pip install -r requirements.txt安装包,结果启动项目时总是报错,显示没有flask模块,通过pip install flask还是不行,于是下载fl ...

  9. SPOJ VLATTICE - Visible Lattice Points 【“小”大数加减】

    题目链接 一道比较简单的莫比乌斯反演,不过ans会爆long long,我是用结构体来存结果的,结构体中两个LL型变量分别存大于1e17和小于1e17的部分 #include<bits/stdc ...

  10. python线程池示例

    使用with方式创建线程池,任务执行完毕之后,会自动关闭资源 , 否则就需要手动关闭线程池资源  import threading, time from concurrent.futures impo ...