File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
lib/active_record/connection_adapters Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11
2+ * master *
3+
4+ * Make login timeout and query timeout backward database.yml friendly for :dblib mode.
5+
6+
27* 3.0.4 *
38
49* Add multiple results set support with #execute_procedure for :dblib mode. [Ken Collins]
Original file line number Diff line number Diff line change @@ -346,15 +346,17 @@ def connect
346346 @connection = case @connection_options [ :mode ]
347347 when :dblib
348348 appname = config [ :appname ] || Rails . application . class . name . split ( '::' ) . first rescue nil
349+ login_timeout = config [ :login_timeout ] . present? ? config [ :login_timeout ] . to_i : nil
350+ timeout = config [ :timeout ] . present? ? config [ :timeout ] . to_i : nil
349351 encoding = config [ :encoding ] . present? ? config [ :encoding ] : nil
350352 TinyTds ::Client . new ( {
351353 :dataserver => config [ :dataserver ] ,
352354 :username => config [ :username ] ,
353355 :password => config [ :password ] ,
354356 :database => config [ :database ] ,
355357 :appname => appname ,
356- :login_timeout => config [ :dblib_login_timeout ] ,
357- :timeout => config [ :dblib_timeout ] ,
358+ :login_timeout => login_timeout ,
359+ :timeout => timeout ,
358360 :encoding => encoding
359361 } ) . tap do |client |
360362 client . execute ( "SET ANSI_DEFAULTS ON" ) . do
You can’t perform that action at this time.
0 commit comments