From e0d59e6219c752d8cffc6b78c2240755f5728922 Mon Sep 17 00:00:00 2001 From: Paul Nikitochkin Date: Mon, 8 Jul 2013 12:31:07 +0300 Subject: #4566: Remove extra decrement of transaction level `rollback_active_record_state!` tries to restore model state on `Exception` by invoking `restore_transaction_record_state` it decrement deep level by `1`. After restoring it ensure that states to be cleared and level decremented by invoking `clear_transaction_record_state`, which cause the bug: because state already reduced in `restore_transaction_record_state`. Removed double derement of transaction level and removed duplicated code which clear transaction state for top level. --- activerecord/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 404443f4ad..624c26e759 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,9 @@ +* Remove extra decrement of transaction deep level. + + Fixes: #4566 + + *Paul Nikitochkin* + * Reset @column_defaults when assigning `locking_column`. We had a potential problem. For example: -- cgit v1.2.3