mysql1418错误

发布时间: 2023-11-21 13:22 阅读: 文章来源:1MUMB5159PS
错误如图

执行升级/安装脚本时发生了错误:

An exception occurred while executing ‘ insert INTO biz_answer_question_report (id, identify, answer_record_id, assessment_id, section_id, item_id, question_id, score, total_score, response, status, comment) select a.id, concat_ws(‘_‘, a.resultId, a.questionId), a.resultId, a.testId, ‘0‘, if(b.item_id is null, 0, b.item_id), a.questionId, a.score, ‘0‘, conver_question_answer(b.answer_mode,a.answer), CASE a.status WHEN ‘noAnswer‘ THEN ‘no_answer‘ WHEN ‘none‘ THEN ‘reviewing‘ WHEN ‘partRight‘ THEN ‘part_right‘ WHEN ‘right‘ THEN ‘right‘ WHEN ‘wrong‘ THEN ‘wrong‘ ELSE ‘reviewing‘ END, a.teacherSay FROM testpaper_item_result_v8 a LEFT JOIN biz_question b ON a.questionId = b.id WHERE a.type ‘exercise‘ LIMIT 0, 80000; ‘: SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION www_jiaoyu18_cn.conver_question_answer does not exist

问题解析

根据手动创建程序返回错误: MySQL 返回: #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 = 1;

升级完成

•••展开全文