Defect #27238
closedMysql Error after upgrading Redmine from 2.5 to 3.*
0%
Description
Hi,
I wanted to upgrade redmine directly from 2.5.2 to 3.4. After successfully upgrade I discovered errors while creating and editing new issues.
I have also tried upgrade my redmine instalation from 2.5.2 to svn 2.6 and later to svn 3.0.
After second upgrade I have discovered that I can't modify any issue in redmine.
With Ruby 2.4.0 errors are the same.
Mysql errors looks like this:
Completed 500 Internal Server Error in 129ms (ActiveRecord: 107.5ms)
ActiveRecord::StatementInvalid (Mysql2::Error: Result consisted of more than one row: UPDATE `issues` SET lft = CASE WHEN lft > 1 THEN lft - 2 ELSE lft END, rgt = CASE WHEN rgt > 1 THEN rgt - 2 ELSE rgt END WHERE `issues`.`root_id` = 7158 AND (lft > 1 OR rgt > 1)):
lib/redmine/nested_set/issue_nested_set.rb:126:in `destroy_children'
app/models/issue.rb:226:in `destroy'
app/controllers/issues_controller.rb:389:in `block in destroy'
app/controllers/issues_controller.rb:387:in `each'
app/controllers/issues_controller.rb:387:in `destroy'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
I also see errors when I create new issue and add polish letters in any field:
Completed 500 Internal Server Error in 117ms (ActiveRecord: 67.8ms)
ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xC4\x85\xC4\x87\xC4\x87' for column 'subject' at row 1: INSERT INTO `issues` (`project_id`, `author_id`, `tracker_id`, `status_id`, `subject`, `description`, `priority_id`, `updated_on`, `created_on`, `lock_version`) VALUES (75, 95, 2, 1, 'ąćć', 'żńó', 2, '2017-10-20 12:05:53', '2017-10-20 12:05:53', 0)):
app/models/issue.rb:212:in `create_or_update'
app/controllers/issues_controller.rb:129:in `create'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
- Redmine version 3.0.7 (upgraded from 2.5.2)
- Ruby 1.9.3 from RVM
- Ruby Passanger 5.1.10
- HTTPD 2.4.6-67.el7.centos.5
- CentOS 7
- mysql-community-server 5.5.57-2.el7
- Redmine version 3.0.7.stable.17016
- Ruby version 1.9.3-p551 (2014-11-13) [x86_64-linux]
- Rails version 4.2.3
- Environment production
- Database adapter Mysql2
- Ruby Passanger 5.1.10
- HTTPD 2.4.6-67.el7.centos.5
- CentOS 7
- mysql-community-server 5.5.57-2.el7
- Subversion 1.7.14
- Git 1.8.3.1
- Filesystem
- redmine_bootstrap_kit 0.2-devel
- redmine_issue_templates 0.1.8
- redmine_spent_time 3.1.2
Related issues