Merge pull request #10697 from zhubert/patch-1

Spelling correction in Upgrading Guide [ci skip]
pass where values to the helper function rather than rely on internal state
save the where values in variables so we don't need to look them up all
the time
change method name to reflect what it actually does.
eliminate some conditionals
partition the where values so we can access the removed ones
update_counters accepts a hash, not an array of hashes
Documentation: Notifications queue does not run in a thread.
In batches test @total was assigned but not used. Use it in tests instead of Post.count
Merge pull request #10702 from divineforest/use-total-in-batches-test

Use @total variable created in the setup of batches tests instead of counting again.
the rake task `db:test:prepare` needs to load the configuration

Without loading the configuration the task will not perform any work.
Merge pull request #10711 from senny/10660_rake_db_test_prepare_needs_config

the rake task `db:test:prepare` needs to load the configuration
Extract AR::Core#inspect and AR::Core.inspect's test code from base_test.rb

The methods got moved to core.rb in commit
b2c9ce341a1c907041f55461aefebb0321280cb5, but the tests never did.
Extract AR::AttributeMethods#attribute_for_inspect's test code out from base_test.rb

The method itself got extracted out from ActiveRecored::Base in commit
ceb33f84933639d3b61aac62e5e71fd087ab65ed, but the test code never did.
push partion logic down and initialization logic up
push partitioning up so bind elimination can get the removed wheres
remove bind values for where clauses that were removed
avoid creating a set if no where values are removed
Merge branch 'bindwhere'

* bindwhere:
  avoid creating a set if no where values are removed
  remove bind values for where clauses that were removed
  push partitioning up so bind elimination can get the removed wheres
  push partion logic down and initialization logic up
  partition the where values so we can access the removed ones
use drop rather than calculate the array length