[bug][开源10.3stable]登陆后进入“项目”主页,点击二级菜单“概况”报错
运行环境:
php 7.2.6 nginx mysql8.0
访问路径:
example.com/index.php?m=project&f=view&projectID=1
错误提示:
18:44:43 ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups FROM `doc` wHeRe lib IN ('1') AND deleted = '0' AND module = '0'' at line 1<p>The sql is: SELECT id,lib,acl,users,groups FROM `doc` wHeRe lib IN ('1') AND deleted = '0' AND module = '0'</p> in lib/base/dao/dao.class.php on line 1392, last called by lib/base/dao/dao.class.php on line 706 through function sqlError.
in framework/base/router.class.php on line 2196 when visiting /index.php?m=project&f=view&projectID=1
问题定位:
sql语句:SELECT id,lib,acl,users,groups FROM `doc` wHeRe lib IN ('1') AND deleted = '0' AND module = '0' 执行出错
将语句中SELECT后的字段加上`包围,在mysql执行正常。
嵌套过深没找到拼装sql的逻辑代码,希望后续修复。
刚刚测试禅道一键安装包没有出现这个问题,可以正常使用,mysql推荐使用 5.5 5.6版本,没有在mysql8版本上做过测试。