EduSoho 升级8.7.0 出错错误无法访问情况二 数据库错误
错误如图
执行升级/安装脚本时出错:
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 FROMtestpaper_item_result_v8
a LEFT JOINbiz_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;