| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method was first seen in 045713ee240fff815edb5962b25d668512649478,
and subsequently reimplemented in
fb2325e35855d62abd2c76ce03feaa3ca7992e4f.
According to @jeremy, this is okay to remove. He thinks it was added
because at the time we didn't have much transaction state to keep track
of, and he viewed it as a hack for us to track it internally, thinking
it was better to ask the connection for the transaction state.
Over the years we have added more and more state to track, a lot of
which is impossible to ask the connection for. So it seems that this is
just a relic of the passed and we will just track the state internally
only.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This fixes issue #3217.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when saving a frozen record, an exception would be thrown
which causes a rollback. However, there is a bug in active record that
"defrost" the record as a side effect:
>> t = Topic.new
=> #<Topic id: nil, ...>
>> t.freeze
=> #<Topic id: nil, ...>
>> t.save
RuntimeError: can't modify a frozen Hash
>> t.frozen?
=> false
>> t.save
=> true
This patch fixes the bug by explictly restoring the frozen state on the
attributes Hash after every rollback.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the following code is deprecated:
Thread.new { Post.find(1) }.join
It should be changed to close the database connection at the end of
the thread:
Thread.new {
Post.find(1)
Post.connection.close
}.join
Only people who spawn threads in their application code need to worry
about this change.
|
| |
|
|
|
|
| |
RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- persisted? is the API defined in ActiveModel
- makes it easier for extension libraries to conform to ActiveModel APIs
without concern for whether the extended object is specifically
ActiveRecord
[#5927 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| |
|
| |
|
|
|
| |
This makes a test fail, but it is revealing a bug in Arel master.
|
|
|
|
|
|
| |
[#922 state:resovled]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
| |
tests to use new style API with an :on options instead of on_* suffix." and "Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction.""
This reverts commit 1b2941cba1165b0721f57524645fe378bee2a950.
[#2991]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use new style API with an :on options instead of on_* suffix." and "Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction."
This reverts commits d2a49e4b1f30c5997e169110eed94a55aee53f56 and da840d13da865331297d5287391231b1ed39721b.
[#2991]
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/transactions.rb
activerecord/test/cases/transaction_callbacks_test.rb
|
|
|
|
|
|
|
|
| |
called after transactions either commit or rollback on all records saved or destroyed in the transaction.
[#2991 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
| |
Signed-off-by: wycats <wycats@gmail.com>
|
|
|
|
| |
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
|
|
|
|
| |
notifying events that are actually being consumed.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
|
|
| |
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
|
|
|
| |
[#1617 state:resolved]
|
|
|
|
|
|
|
| |
This caused failures on sqlite, sqlite3 and postgresql
This reverts commit fc09ebc669bd58f415f7d3ef932ef02dab821ab5.
[#922 state:reopened]
|
|
|
|
|
| |
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#922 state:committed]
|
| |
|
|
|
|
|
|
|
|
| |
'postgres' driver.
[#1748 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
| |
can't joined, a new savepoint is required even if :requires_new is not set. Use :requires_new option instead of :nest. Update changelog.
[#383 state:committed]
|
|
|
|
|
|
| |
- Fixed compatibility with the old 'postgres' driver which doesn't support
transaction state introspection.
- Added unit tests for it.
|
|
|
|
| |
documentation for nested transactions.
|
| |
|
|
|
|
| |
transaction_test.
|
| |
|
|
|
|
| |
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
|
|
|
|
| |
- also clean up some cruft remaining from per-thread connection cache
|
|
|
|
| |
fixed pool with default maximum of 5 connections
|
| |
|
|
|
|
|
|
|
| |
Previously this would have committed the transaction but not carried out save or destroy operation.
[#891 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
|
|
|
|
|
|
|
| |
state:resolved]
SQLite#add_column executes "VACUUM", which fails if inside a live transaction. This patch
ensures a valid exception is raised if add_column is executed within a live transaction for
sqlite adapter.
|
|
|
|
| |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
|
|
|
| |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|