aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2014-07-24 16:25:34 -0400
committerArthur Neves <arthurnn@gmail.com>2014-07-24 16:25:34 -0400
commit368525a5a5b43a2955d063c2f81af5d6ed1c2188 (patch)
treeb33947db55e08c993ca827d7dce3ea570bedbfdb /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
parent3f4e97f807eb475ac8c311e5baf138249a8a1ab2 (diff)
downloadrails-368525a5a5b43a2955d063c2f81af5d6ed1c2188.tar.gz
rails-368525a5a5b43a2955d063c2f81af5d6ed1c2188.tar.bz2
rails-368525a5a5b43a2955d063c2f81af5d6ed1c2188.zip
Remove finishing? method from transaction.
The finishing variable on the transaction object was a work-around for the savepoint name, so after a rollback/commit the savepoint could be released with the previous name. related: 9296e6939bcc786149a07dac334267c4035b623a 60c88e64e26682a954f7c8cd6669d409ffffcc8b
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_adapter.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
index f8c054eb69..1397358f79 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -357,7 +357,9 @@ module ActiveRecord
end
def current_savepoint_name
- "active_record_#{open_transactions}"
+ if current_transaction.is_a? SavepointTransaction
+ current_transaction.savepoint_name
+ end
end
# Check the connection back in to the connection pool