aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2016-08-04 15:57:34 -0700
committerGitHub <noreply@github.com>2016-08-04 15:57:34 -0700
commit320d40123ab0befe248373aab8ac2e2a3dec33cd (patch)
tree5c5343b99cb0d08147f2d869ee1ffb04e112971c /activerecord/lib
parent01a69e27a4e55504af8fe776826d659550e6f89e (diff)
parent7443a332a74d7e77f2a4fa2b1e9118da08351121 (diff)
downloadrails-320d40123ab0befe248373aab8ac2e2a3dec33cd.tar.gz
rails-320d40123ab0befe248373aab8ac2e2a3dec33cd.tar.bz2
rails-320d40123ab0befe248373aab8ac2e2a3dec33cd.zip
Merge pull request #26059 from rails/rename-deadlock-detected-to-deadlocked
The problem isn't the detection but the deadlock itself
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb2
-rw-r--r--activerecord/lib/active_record/errors.rb4
3 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
index acc21866f1..5e9705e02f 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -753,7 +753,7 @@ module ActiveRecord
when ER_DATA_TOO_LONG
ValueTooLong.new(message)
when ER_LOCK_DEADLOCK
- DeadlockDetected.new(message)
+ Deadlocked.new(message)
else
super
end
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index e213c991c8..8a1fdc9f92 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -422,7 +422,7 @@ module ActiveRecord
when SERIALIZATION_FAILURE
SerializationFailure.new(message)
when DEADLOCK_DETECTED
- DeadlockDetected.new(message)
+ Deadlocked.new(message)
else
super
end
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb
index 3f75ce4099..03e6e1eee3 100644
--- a/activerecord/lib/active_record/errors.rb
+++ b/activerecord/lib/active_record/errors.rb
@@ -300,9 +300,9 @@ module ActiveRecord
class SerializationFailure < TransactionRollbackError
end
- # DeadlockDetected will be raised when a transaction is rolled
+ # Deadlocked will be raised when a transaction is rolled
# back by the database when a deadlock is encountered.
- class DeadlockDetected < TransactionRollbackError
+ class Deadlocked < TransactionRollbackError
end
# IrreversibleOrderError is raised when a relation's order is too complex for