Conflicts: activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb Conflicts: activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
While the patched PredicateBuilder in 3.1.5 prevents a user from specifying a table name using the `table.column` format, it doesn't protect against the nesting of hashes changing the table context in the next call to build_from_hash. This fix covers this case as well.
Thanks to Ben Murphy for reporting this CVE-2012-2661
This is a back-port of rails/rails#6525. See the commit notes there for details.