test for regression from a712e08ebe21f6d8653a0e6602df2e0f5d40d9ca
reverted back our changes and added in the new define_method
checking in the abstractions for valid type checking:
Merge pull request #9206 from ranjaykrishna/use_define_method

Use define method instead of class_eval
Merge pull request #9204 from ranjaykrishna/col-prob

schema dumper tests now conducted by ActiveRecord::Base.Connection
Avoid to_sym calls
Don't call after_commit when creating through an association and save fails, fixes #5802
Merge pull request #9115 from bensie/issue_5802

Don't call after_commit when creating through an association and save fails, fixes #5802
9253: Before writing a numeric attribute value, ActiveRecord does an implicit
conversion of boolean types (true => 1 and false => 0). If the numeric value
being assigned is a BigDecimal, then ActiveRecord compares a BigDecimal to
true and false. This is known to be very slow in Ruby 1.9.3.
Merge pull request #9254 from warnickr/9253_avoid_bigdecimal_performance_issue

Before writing a numeric attribute value, ActiveRecord does an implicit conversion of boolean types (true => 1 and false => 0). If the numeric value being assigned is a BigDecimal, then ActiveRecord compares a BigDecimal to true and false.

This is known to be very slow in Ruby 1.9.3 (see http://www.ruby-forum.com/topic/4409452 and https://bugs.ruby-lang.org/issues/7645#change-35188).

The Ruby core team has implemented a fix for this issue that will be included in Ruby 2, but they appear to have no intention of back-porting this fix to Ruby 1.9.3. In my case, the performance impact of this issue was enormous (200% - 300% performance hit) for some of the pages in my application.

See c75b5a88a82c79fdf95dfea4d72bf3c5a829930e applied to 3-2-stable branch for more reasoning and a benchmark.
don't cache invalid subsets when preloading hmt associations.

closes #8423.