Project

General

Profile

mysql error after Upgrade: Operand should contain 1 column(s)

Added by Jorge Martins over 8 years ago

Hi,

Im trying to upgrade from version 2.6.1 to 3.2.2 on a differente server.

I've manage to setup everything OK and I can access several redmine pages (users, administration, project list, etc...), but when I try to go to a project page or a issue page I get an mysql error:

ActionView::Template::Error (Mysql2::Error: Operand should contain 1 column(s): SELECT COUNT() FROM `versions` INNER JOIN `projects` ON `projects`.`id` = `versions`.`project_id` WHERE (projects.id = 491 OR (projects.status <> 9 AND ( versions.sharing = 'system' OR (projects.lft >= 381 AND projects.rgt <= 392 AND versions.sharing = 'tree') OR (projects.lft < 382 AND projects.rgt > 383 AND versions.sharing IN ('hierarchy', 'descendants')) OR (projects.lft > 382 AND projects.rgt < 383 AND versions.sharing = 'hierarchy')))) AND ((versions.project_id = 678 AND versions.id IN (NULL))OR (versions.project_id != 678 AND versions.project_id IN (SELECT `projects`. FROM `projects` WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))))))

Full error log:

Processing by ProjectsController#show as HTML
Parameters: {"id"=>"project1"}
Current user: user (id=4)
Rendered projects/_members_box.html.erb (1.5ms)
Rendered projects/_sidebar.html.erb (1.3ms)
Rendered projects/show.html.erb within layouts/base (20.5ms)
Completed 500 Internal Server Error in 276ms (ActiveRecord: 41.5ms)

ActionView::Template::Error (Mysql2::Error: Operand should contain 1 column(s): SELECT COUNT() FROM `versions` INNER JOIN `projects` ON `projects`.`id` = `versions`.`project_id` WHERE (projects.id = 491 OR (projects.status <> 9 AND ( versions.sharing = 'system' OR (projects.lft >= 381 AND projects.rgt <= 392 AND versions.sharing = 'tree') OR (projects.lft < 382 AND projects.rgt > 383 AND versions.sharing IN ('hierarchy', 'descendants')) OR (projects.lft > 382 AND projects.rgt < 383 AND versions.sharing = 'hierarchy')))) AND ((versions.project_id = 678 AND versions.id IN (NULL))
OR (versions.project_id != 678 AND versions.project_id IN (SELECT `projects`.
FROM `projects` WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')))))):
85: <% end >
86:
87: <h1><
= page_header_title ></h1>
88:
89: <
if display_main_menu?(Herve Harster) >
90: <div id="main-menu">
91: <
= render_main_menu(Herve Harster) %>
lib/redmine.rb:230:in `block (2 levels) in <top (required)>'
lib/redmine/menu_manager.rb:446:in `allowed?'
lib/redmine/menu_manager.rb:164:in `block in menu_items_for'
lib/redmine/menu_manager.rb:163:in `each'
lib/redmine/menu_manager.rb:163:in `menu_items_for'
lib/redmine/menu_manager.rb:90:in `render_menu'
lib/redmine/menu_manager.rb:80:in `render_main_menu'
app/views/layouts/base.html.erb:88:in `_app_views_layouts_base_html_erb___1124545594438225295_34306220'
app/controllers/projects_controller.rb:153:in `show'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Environment

Environment:
  Redmine version                3.2.2.stable
  Ruby version                   2.3.0-p0 (2015-12-25) [x86_64-linux-gnu]
  Rails version                  4.2.5.2
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.7.4
  Filesystem                     
Redmine plugins:
  projects_tree_view             0.0.8
  redmine_app__space             1.0.3
  redmine_app_timesheets         1.4.11
  redmine_easy_edit              0.0.6

Any ideas how to solve this?

Thanks


Replies (1)

RE: mysql error after Upgrade: Operand should contain 1 column(s) - Added by Jorge Martins over 8 years ago

Already solved it by removing the redmine_app_timesheets plugin

    (1-1/1)