Skip to content

Commit e3e5304

Browse files
author
Anna Carey
committed
noted rails pull request
1 parent f95a798 commit e3e5304

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

lib/arel/visitors/sqlserver.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ def find_and_fix_uncorrelated_joins_in_select_statement(o)
249249

250250
def rowtable_projections(o, a)
251251
core = o.cores.first
252-
puts "windowed_single_distinct_select_statement?(o)#{windowed_single_distinct_select_statement?(o)} core.groups.blank?:#{core.groups.blank?}"
253252
if windowed_single_distinct_select_statement?(o) && core.groups.blank?
254253
tn = table_from_select_statement(o).name
255254
core.projections.map do |x|

test/cases/connection_management_test_sqlserver.rb

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#This rails pull request will make this code unnecessary https://github.com/rails/rails/pull/13745
2+
13
require "cases/sqlserver_helper"
24
require "rack"
35

@@ -6,7 +8,6 @@ module ConnectionAdapters
68
class ConnectionManagementTest < ActiveRecord::TestCase
79

810
COERCED_TESTS = [:test_connection_pool_per_pid]
9-
# Until that patch is made to rails we are preventing this test from running in this gem.
1011

1112
include SqlserverCoercedTest
1213

@@ -17,30 +18,9 @@ def test_coerced_connection_pool_per_pid
1718
object_id = ActiveRecord::Base.connection.object_id
1819

1920
rd, wr = IO.pipe
20-
21-
# #https://www.ruby-forum.com/topic/4221299
22-
# puts "rd.internal_encoding:#{rd.internal_encoding}\nrd.external_encoding:#{rd.external_encoding}"
23-
# puts "wr.internal_encoding:#{wr.internal_encoding}\nwr.external_encoding:#{wr.external_encoding}"
24-
# # rd.internal_encoding:
25-
# # rd.external_encoding:UTF-8
26-
# # wr.internal_encoding:
27-
# # wr.external_encoding:UTF-8
28-
29-
3021
rd.binmode
3122
wr.binmode
32-
33-
# ERROR
34-
# marshal data too short
35-
# test/cases/connection_management_test_sqlserver.rb:43:in `load'
36-
# test/cases/connection_management_test_sqlserver.rb:43:in `test_coerced_connection_pool_per_pid'
37-
38-
39-
# /Users/acarey/code/nextgear/sqlserver/annaswims/activerecord-sqlserver-adapter/test/cases/connection_management_test_sqlserver.rb:41:in `write': "\x98" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
40-
# from /Users/acarey/code/nextgear/sqlserver/annaswims/activerecord-sqlserver-adapter/test/cases/connection_management_test_sqlserver.rb:41:in `block in test_coerced_connection_pool_per_pid'
41-
# from /Users/acarey/code/nextgear/sqlserver/annaswims/activerecord-sqlserver-adapter/test/cases/connection_management_test_sqlserver.rb:38:in `fork'
42-
# from /Users/acarey/code/nextgear/sqlserver/annaswims/activerecord-sqlserver-adapter/test/cases/connection_management_test_sqlserver.rb:38:in `test_coerced_connection_pool_per_pid'
43-
pid = fork {
23+
pid = fork {
4424
rd.close
4525
wr.write Marshal.dump ActiveRecord::Base.connection.object_id
4626
wr.close

0 commit comments

Comments
 (0)