rails/rails — pull request #13291 by strzibny (2013-12-12 10:37:22+00:00)
Title: Translate new unique constraint error message for sqlite >= 3.8.2

The new version of sqlite (3.8.2) is handling the error message for unique constraint differently so the old check is not enough.

I was getting the following test failure using sqlite `3.8.2` (and using sqlite3 gem at `1.3.7` and rails at `4.0.2`):
```
1) Failure:
ActiveRecord::AdapterTest#test_uniqueness_violations_are_translated_to_specific_exception [/builddir/build/BUILD/rubygem-activerecord-4.0.2/usr/share/gems/gems/activerecord-4.0.2/test/cases/adapter_test.rb:141]:
[ActiveRecord::RecordNotUnique] exception expected, not
Class:
Message: <"SQLite3::ConstraintException: UNIQUE constraint failed: subscribers.nick: INSERT INTO subscribers(nick) VALUES('me')">
---Backtrace---
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:108:in `step'
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:108:in `block in each'
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:107:in `loop'
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:107:in `each'
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:149:in `map'
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:149:in `block in execute'
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:95:in `prepare'
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:134:in `execute'
```

This PR resolves this issue by checking the new returning error message as well.