プロジェクト

全般

プロフィール

Defect #1461

MSSQL 2012 500 Internal Server Error

Alexander Ryabinovskiy10ヶ月前に追加. 9ヶ月前に更新.

ステータス:
終了(Closed)
優先度:
通常(Normal)
対象バージョン:
開始日:
2017/01/23
期日:
進捗率:

100%

予定工数:

説明

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'

関係しているリビジョン

リビジョン 434:10022ef735d4 (差分)
Tomohisa Kusukawa10ヶ月前に追加

fixes #1461 MSSQL 2012 500 Internal Server Error

履歴

#1 Tomohisa Kusukawa10ヶ月前に更新

  • ステータス新規(New) から 解決(Resolved) に変更
  • 進捗率0 から 100 に変更

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

#2 Tomohisa Kusukawa10ヶ月前に更新

  • 担当者Alexander Ryabinovskiy にセット
  • 対象バージョン0.3.4 にセット

Thank you very much for your report!

I fixed this problem in 10022ef735d4 .

#3 Tomohisa Kusukawa9ヶ月前に更新

  • ステータス解決(Resolved) から 終了(Closed) に変更

他の形式にエクスポート: Atom PDF