| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is a backport of 4bc2ae0da1dd812aee759f6d13ad428354cd0e13.
It fixes bug #7950.
Conflicts:
activerecord/lib/active_record/relation/calculations.rb
activerecord/lib/active_record/relation/finder_methods.rb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport for #7521
- added tests to confirm establish_connection uses DATABASE_URL and
Rails.env correctly even when no arguments are passed in.
- updated rake db tasks to support DATABASE_URL, and added tests to
confirm correct behavior for these rake tasks. (Removed
establish_connection call from some tasks since in those cases
the :environment task already made sure the function would be called)
- updated Resolver so that when it resolves the database url, it
removes hash values with empty strings from the config spec (e.g.
to support connection to postgresql when no username is specified).
- updated ResolverTest to use current_adapter? to check the type of
the current adapter.
|
|
|
|
| |
Also remove the feature detecting for Ruby 1.9
|
|
|
|
|
|
|
| |
Decode attributes pulled from URI.parse
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/connection_specification.rb
|
|
|
|
| |
Fixes #7955
|
|
|
|
|
|
|
| |
Backport of #6441 cb6f83935 . Old 'wait_timeout' is still supported,
but conflicts with mysql2 using that spec key for different thing.
'checkout_timeout' can now be used taking precedence for ConnectionPool
over 'wait_timeout'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0693e079708a52b777f2b7872b8e3d467b880a0d.
Revert "Cache columns metadata to avoid extra while testing"
This reverts commit a82f1e3f5d11c8dfba9f4c911745ec40a7965216.
Reason: This is causing failures in the postgresql build.
See http://travis-ci.org/#!/rails/rails/builds/2485584
Related with #7675
|
| |
|
|
|
|
| |
See 02ca9151a043a4fefbb3f22edd05f0cd392fffaa
|
|
|
|
|
|
| |
Disable query cache for lock queries
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
|
|
|
|
|
|
| |
Require URI in ConnectionSpecification
Conflicts:
activerecord/lib/active_record/connection_adapters/connection_specification.rb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[#6464]
Fixes #6464
Synchronize the contents of the release method in ConnectionPool due to
errors when running in high concurrency environments.
Detected invalid hash contents due to unsynchronized modifications
with concurrent users
org/jruby/RubyHash.java:1356:in `keys'
/usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a
ctive_record/connection_adapters/abstract/connection_pool.rb:294:in
`release'
/usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a
ctive_record/connection_adapters/abstract/connection_pool.rb:282:in
`checkin'
|
|
|
|
| |
Synchronize read and modification of @reserved_connections
|
|
|
|
|
| |
String is Enumerable in 1.8.7, which means that passing a String to
remove_column was generating deprecation warnings during tests.
|
| |
|
|
|
|
| |
variables' in mutex ConditionVariables
|
| |
|
|
|
|
| |
threads, it doesn't since 3.2.0
|
|
|
|
| |
use for the current thread. fixes #5330
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 3dbedd2 added NOT NULL constraints both to table
creation and modification. For creation the new default
makes sense, but the generic situation for changing a
table is that there exist records. Those records have
no creation or modification timestamps, and in the
general case you don't even know them, so when updating
a table these constraints are not going to work. See
a bug report for this use case in #3334.
|
|
|
|
|
|
|
|
|
| |
Options is needed for some Rails extensions to determine when
referential integrity should be disabled
This reverts commit bcb466c543451dce69403aaae047295758589d8e.
Fixes #5052
|
| |
|
|
|
|
|
|
| |
'uninitialized constant ActiveRecord::Deprecation in Rails3.2.1'
Just a typo of 'ActiveSupport::...'
|
|
|
|
| |
[closes #4750]
|
|
|
|
|
|
|
|
|
|
|
| |
index_name has been using the following expression
"index_#{table_name}_on_#{Array.wrap(options[:column]) * '_and_'}"
since at least 2006 (bc7f2315), and that's how they come out in my DB.
Please check that this is correct before merging into master, perhaps
I'm misunderstanding the section I changed.
|
|
|
|
|
|
|
|
|
|
| |
It was a bad idea to rescue exceptions here. This can interfere with
transaction rollbacks which seems to be the cause of current CI
failure.
Instead, each adapter should implement its own DB-specific O(1)
implementation, and we fall back on the generic, slower, implementation
otherwise.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
new one
|
| |
|
| |
|
|
|
|
|
|
| |
At New Relic, we have hundreds of thousands of tables, and our migrations took 30 minutes without this similar patch. This cuts it down to a more reasonable amount of time.
The rescue false part is ugly, but necessary as far as I can tell. I don't know of a cross-database statement you can make that will work without trapping errors.
|
|
|
|
| |
it clear which methods are synchronized.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
pool.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
resolver.
|
| |
|
| |
|