rails/rails — pull request #12742 by mariovisic (2013-11-02 06:01:33+00:00)
Title: update_all does not work when updating binary columns

Running update_all on an active record model to update a binary column
ends up with an SQL escaping error of `incomplete multibyte character`.

This issue is not present on the latest rails 3.2 but is present on rails 4 and on master.

I've added a failing test here, but no fix. Here is the error:
```
PG::Error: incomplete multibyte character

/Users/mario/Work/rails/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb:126:in `escape_string'
/Users/mario/Work/rails/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb:126:in `quote_string'
/Users/mario/Work/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb:15:in `quote'
/Users/mario/Work/rails/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb:19:in `quote'
/Users/mario/Work/rails/activerecord/lib/active_record/sanitization.rb:163:in `quote_bound_value'
/Users/mario/Work/rails/activerecord/lib/active_record/sanitization.rb:104:in `block in sanitize_sql_hash_for_assignment'
/Users/mario/Work/rails/activerecord/lib/active_record/sanitization.rb:103:in `each'
/Users/mario/Work/rails/activerecord/lib/active_record/sanitization.rb:103:in `map'
/Users/mario/Work/rails/activerecord/lib/active_record/sanitization.rb:103:in `sanitize_sql_hash_for_assignment'
/Users/mario/Work/rails/activerecord/lib/active_record/sanitization.rb:39:in `sanitize_sql_for_assignment'
/Users/mario/Work/rails/activerecord/lib/active_record/relation.rb:308:in `update_all'
/Users/mario/Work/rails/activerecord/lib/active_record/querying.rb:7:in `update_all'
test/cases/binary_test.rb:56:in `test_upate_all_binary'
```