aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/dynamic_matchers.rb
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2019-07-25 13:59:15 -0700
committerJohn Hawthorn <john@hawthorn.email>2019-07-25 14:15:39 -0700
commit15c81c8ed4930574d9900a6f947d4e0ebaa82a2f (patch)
tree5181c4435fef10ca4367b786e3a9c6dcc76242b1 /activerecord/lib/active_record/dynamic_matchers.rb
parentbd5edc29709116104345cf09c17f1db89428753e (diff)
downloadrails-15c81c8ed4930574d9900a6f947d4e0ebaa82a2f.tar.gz
rails-15c81c8ed4930574d9900a6f947d4e0ebaa82a2f.tar.bz2
rails-15c81c8ed4930574d9900a6f947d4e0ebaa82a2f.zip
Use connection.error_number in MySQLDatabaseTasks
MySQLDatabaseTasks, like AbstractMysqlAdapter, should be able to operate on any mysql adapter, not just mysql2. Errors having a .error_number attribute is a mysql2 specific API, which we (Rails) don't control, so we should instead use connection.error_number(err), which we do. This also updates tests to better test how this really works, previously it stubbed create_database to raise Tasks::DatabaseAlreadyExists, which can never happen.
Diffstat (limited to 'activerecord/lib/active_record/dynamic_matchers.rb')
0 files changed, 0 insertions, 0 deletions