Actions
Defect #21411
closedMySQL 5.7: Mysql2::Error: Expression #1 of ORDER BY clause is not in SELECT list...
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
Description
# ruby script/about sh: darcs: command not found sh: hg: command not found sh: bzr: command not found Environment: Redmine version 2.5.2.stable Ruby version 1.9.3-p545 (2014-02-24) [x86_64-linux] Rails version 3.2.19 Environment production Database adapter Mysql2 SCM: Subversion 1.7.4 Git 1.7.12.4 Filesystem Redmine plugins: parent_issue_filter 1.0.1 redmine_code_review 0.7.0 redmine_importer 1.2 redmine_issue_templates 0.0.9 redmine_xls_export 0.2.1
Upgrade database to MySQL 5.7, login is OK, project overview display '500 Internal Server Error'.
stack trace
Started GET "/naca00/projects/********" for xxx.xxx.xxx.xxx at 2015-11-28 11:47:17 +0800 Processing by ProjectsController#show as HTML Parameters: {"id"=>"********"} Current user: ******** (id=280) Completed 500 Internal Server Error in 10.7ms ActiveRecord::StatementInvalid (Mysql2::Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'redmine .projects.name' which is not in SELECT list; this is incompatible with DISTINCT: SELECT DISTINCT `members`.id FROM `members` LEF T OUTER JOIN `projects` ON `projects`.`id` = `members`.`project_id` LEFT OUTER JOIN `member_roles` ON `member_roles`.`member_id` = `members`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `member_roles`.`role_id` WHERE `members`.`user_id` = 280 AND `members` .`project_id` = 169 AND (projects.status<>9) ORDER BY projects.name LIMIT 1): app/models/user.rb:464:in `block in membership' app/models/user.rb:466:in `yield' app/models/user.rb:466:in `default' app/models/user.rb:466:in `membership' app/models/user.rb:479:in `roles_for_project' app/models/user.rb:538:in `allowed_to?' app/controllers/application_controller.rb:257:in `authorize'
Actions