Project

General

Profile

Defect #1461

MSSQL 2012 500 Internal Server Error

Added by Alexander Ryabinovskiy almost 3 years ago. Updated almost 3 years ago.

Status:
終了(Closed)
Priority:
通常(Normal)
Target version:
Start date:
01/23/2017
Due date:
% Done:

100%

Estimated time:

Description

Hello.
I have "500 Internal Server Error" with my redmine on MSSQL 2012 server.
I found this related issue: #1426 . You have fixed this error for MySQL, but you have used too specific syntax that does not work for MSSQL 2012.
I attached the patch for MSSQL 2012, it works for me. But I have not time to create more general solution, for all servers.
Maybe we need to use the power of ORM, instead of having to write code directly.

Environment:
  Redmine version                3.3.0.stable
  Ruby version                   2.0.0-p645 (2015-04-13) [i386-mingw32]
  Rails version                  4.2.6
  Environment                    production
  Database adapter               SQLServer
SCM:
  Mercurial                      3.1.1
  Filesystem                     
Redmine plugins:
  clipboard_image_paste          1.10
  redmine_default_assign         0.6
  redmine_ldap_sync              2.0.8.devel
  redmine_work_time              0.3.3

Log:
tarted GET "/work_time/show/opr" for 127.0.0.1 at 2017-01-23 14:40:07 +0300
Processing by WorkTimeController#show as HTML
  Parameters: {"id"=>"opr"}
  Current user: sd557 (id=3)
Completed 500 Internal Server Error in 31ms (ActiveRecord: 15.6ms)

ActiveRecord::StatementInvalid (TinyTds::Error: Incorrect syntax near ')'.: EXEC sp_executesql N'SELECT COUNT(parent_id = 8259) FROM [issues]'):
  plugins/redmine_work_time/app/controllers/work_time_controller.rb:1381:in `make_pack_issue'
  plugins/redmine_work_time/app/controllers/work_time_controller.rb:1321:in `block in make_pack'
  plugins/redmine_work_time/app/controllers/work_time_controller.rb:1316:in `make_pack'
  plugins/redmine_work_time/app/controllers/work_time_controller.rb:47:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Files

Associated revisions

Revision 434:10022ef735d4 (diff)
Added by Tomohisa Kusukawa almost 3 years ago

fixes #1461 MSSQL 2012 500 Internal Server Error

Revision b43b0822 (diff)
Added by tkusukawa almost 3 years ago

fixes #1461 MSSQL 2012 500 Internal Server Error

History

#1

Updated by Tomohisa Kusukawa almost 3 years ago

  • Status changed from 新規(New) to 解決(Resolved)
  • % Done changed from 0 to 100

更新履歴 commit:10022ef735d4 で適用されました。

#2

Updated by Tomohisa Kusukawa almost 3 years ago

  • Assignee set to Alexander Ryabinovskiy
  • Target version set to 0.3.4

Thank you very much for your report!

I fixed this problem in commit:10022ef735d4 .

#3

Updated by Tomohisa Kusukawa almost 3 years ago

  • Status changed from 解決(Resolved) to 終了(Closed)

Also available in: Atom PDF