| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fair connection pool2
Conflicts:
activerecord/test/cases/associations/eager_test.rb
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The core of this fix is a threadsafe, fair Queue class. It is
very similar to Queue in stdlib except that it supports waiting
with a timeout.
The issue this solves is that if several threads are contending for
database connections, an unfair queue makes is possible that a thread
will timeout even while other threads successfully acquire and release
connections. A fair queue means the thread that has been waiting the
longest will get the next available connection.
This includes a few test fixes to avoid test ordering issues that
cropped up during development of this patch.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
reflection.
ActiveRecord::FinderMethods#construct_limited_ids_condition will raise
ThrowResult if the limited reflection comes back empty. The other callers
of #construct_limited_ids_condition handle this exception (more specifically,
the callers of construct_relation_for*), but #exists? didn't until now.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This behavior was added in be4ecdcc87984e9421ff5d5c90d33f475e0fbc01.
Closes #1139.
Fixes #2553, #1141, #1623 and #2062.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
others happy that do not work without a column alias.
Conflicts:
activerecord/lib/active_record/relation/finder_methods.rb
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix #6635. We should call Scoping methods, before calling Array methods.
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
There are two possible scenarios where the @mass_assignment_options
instance variable can become corrupted:
1. If the assign_attributes doesn't complete correctly, then
subsequent calls to a nested attribute assignment method will use
whatever options were passed to the previous assign_attributes call.
2. With nested assign_attributes calls, the inner call will overwrite
the current options. This will only affect nested attributes as the
attribute hash is sanitized before any methods are called.
To fix this we save the current options in a local variable and then
restore these options in an ensure block.
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Notify A User they Have Pending Migrations
|
| | | | | | |
| | | | | | |
| | | | | | | |
can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
|
| | | | | | |
| | | | | | |
| | | | | | | |
if a rails project needs to be migrated ActiveRecord::Migrator.needs_migration? will be true or false if the current version matches the last version.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix fragile #assert_queries implementation and usages.
|
| | |_|/ / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Several tests that passed when run in the order they are loaded
by rake test were failing when run in different sequences due to
problems with the implementation of assert_queries and
assert_no_queries as well as incorrect assumptions made about
how many queries might be executed by a database adapter in
various cases.
|
| | | | | | | |
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
ActiveRecord#attributes optimization: minimize objects created
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add ActiveRecord::Base#destroy!
|
| | | | | | | |
|
| | | | | | | |
|
|/ / / / / / |
|
| |_|/ / /
|/| | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
now we can invoke previously added scope extension methods
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* master-sec:
Strip [nil] from parameters hash. Thanks to Ben Murphy for reporting this!
predicate builder should not recurse for determining where columns. Thanks to Ben Murphy for reporting this
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Thanks to Ben Murphy for reporting this
CVE-2012-2661
|
| | | | | | |
|
| |_|_|/ /
|/| | | |
| | | | |
| | | | | |
Thanks @splattael.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
serialized values to indifferent access.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Properly discover a connection is closed in postgresql_adapter
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
PQstatus doesn't properly test if future operations will succeed. A
PQping function is added to libpq in PostgreSQL 9.1, but if we rely
on it, everyone on earlier versions of Postgres is out of luck,
and the pg gem wouldn't have the 'fix' until the next release.
Thanks to @cbrecabarren and @ged for handling all the dirty details.
Closes #3392.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix #5797. Error calling dup method on AR model with serialized field
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix logs name consistency.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| |\ \ \ \ \ \ |
|
| | | | | | | | |
|
| | | | | | | | |
|