Every now and then when I am working on making the SQL Server adapter pass all 
the ActiveRecord tests, I notice one that looks like a false positive in the 
core DBs. Here is one case in relations_test.rb. Can someone look at this and 
just tell me it is normal for other DBs and just odd for SQL Server? Or maybe 
it is just my understand of some SQL standard. I'm really not that SQL smart. 
Honestly.

  def test_count_explicit_columns
    Post.update_all(:comments_count => nil)
    posts = Post.scoped
    ...
    assert_equal 0, posts.where('id is not null').select('comments_count').count
    ...
  end

OK, this passes in standard DBs, postgresql, sqlite3, and mysql. But why? There 
are 11 rows, all where comments_count is null. Do other DBs at this point make 
a count some sort of aggregate sum? 


 - Ken



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to