Skip to content

Commit b04bece

Browse files
committed
Add WITH NO_INFOMSGS to user_options method. Fixes #580
1 parent 9f60ae1 commit b04bece

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## v4.2.18
22

3+
## Fixed
4+
5+
* Add `WITH NO_INFOMSGS` to `user_options` method. Fixes #580
6+
37
#### Changed
48

59
* Pass the `:contained` option to TinyTDS. Fixes #527

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.17
1+
4.2.18

lib/active_record/connection_adapters/sqlserver/database_statements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def use_database(database = nil)
154154

155155
def user_options
156156
return {} if sqlserver_azure?
157-
rows = select_rows('dbcc useroptions', 'SCHEMA')
157+
rows = select_rows('DBCC USEROPTIONS WITH NO_INFOMSGS', 'SCHEMA')
158158
rows = rows.first if rows.size == 2 && rows.last.empty?
159159
rows.reduce(HashWithIndifferentAccess.new) do |values, row|
160160
if row.instance_of? Hash

0 commit comments

Comments
 (0)