源码部署 1.18.9版本
点击分享按钮报错
Cause: java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT
; uncategorized SQLException; SQL state [HY000]; error code [3065]; Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT; nested exception is java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT] with root cause
java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
Error querying database. Cause: java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT
The error may exist in io/dataease/ext/ExtPanelShareMapper.xml
The error may involve defaultParameterMap
The error occurred while setting parameters
SQL: select distinct id, name, status from (select distinct s.panel_group_id as id, g.name, g.status, ( CASE s.type WHEN 0 THEN (select nick_name from sys_user where user_id = s.target_id) WHEN 1 THEN (select name from sys_role where role_id = s.target_id) WHEN 2 THEN (select name from sys_dept where dept_id = s.target_id) END ) as target_name from panel_share s left join panel_group g on g.id = s.panel_group_id where (s.granter is not null and s.granter = ?) or (s.granter is null and g.create_by = ?) order by s.create_time desc) query_temp where target_name is not null
Cause: java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT
; uncategorized SQLException; SQL state [HY000]; error code [3065]; Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT; nested exception is java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT] with root cause
java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘dataease.s.create_time’ which is not in SELECT list; this is incompatible with DISTINCT
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
页面报错信息:ORDER BY clause is not in SELECT list,参考如下链接:离线安装 - DataEase 文档 调整下 MySQL 的 sql_mode 配置,建议其它配置也参照调整下,避免因配置导致的其它问题出现。
感谢 解决了
文档可以完善下
5.7 版本
5.7
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
8版本 取消了NO_AUTO_CREATE_USER关键字 得删除
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION