Merge pull request #12065 from SamSaffron/result_optimisation

Perf: micro optimised Result column hash_row creation
Merge pull request #12148 from gzohari/callback-typo

Fix typo in set_callback docs. [ci skip]
Merge pull request #12194 from thedarkone/readonly-merger-fix

Relation#merge should not lose readonly(false) flag.
Conflicts:
	activerecord/CHANGELOG.md
Merge pull request #12185 from SamSaffron/join_dep

Reduce allocations when extracting AR models
Merge pull request #12135 from dylanahsmith/avoid_empty_transaction

Avoid empty transaction from setting has_one association on new record.

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
Merge branch '4-0-stable' of github.com:rails/rails into 4-0-stable

* '4-0-stable' of github.com:rails/rails:
  Merge pull request #12135 from dylanahsmith/avoid_empty_transaction
  Merge pull request #12185 from SamSaffron/join_dep
  Merge pull request #12194 from thedarkone/readonly-merger-fix
  Merge pull request #12148 from gzohari/callback-typo
  Merge pull request #12143 from rajcybage/fixing_typos
  Merge pull request #12139 from vipulnsward/typos_av
  Merge pull request #12130 from egilburg/patch-1
Merge pull request #12188 from SamSaffron/master

Perf: avoid dupes add fallback logic for coders
Check if the SQL is not a prepared statement

When the adapter is with prepared statement disabled and the binds array
is not empty the connection adapter will try to set the binds values and
will fail. Now we are checking if the adapter has the prepared statement
disabled.

Fixes #12023

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
	activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
Remove invalid comment

This is not valid anymore after 08477a651648ba4417ded128aa37b9ae0dcbc9ce
Fix inverted conditional

Oops, I should had run the tests