aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
Commit message (Collapse)AuthorAgeFilesLines
* Work around undiagnosed bug that's draining a relation's bind_valuesJeremy Kemper2012-11-281-0/+1
|
* schema cache already has the columns as a hash, so use thatAaron Patterson2012-11-251-1/+1
|
* speed up fixture loading by querying the schema cache for column namesAaron Patterson2012-11-251-1/+1
|
* use bind values for join columnsAaron Patterson2012-11-101-4/+4
| | | | | | | | | | 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
* fixed support for DATABASE_URL for rake db tasksGrace Liu2012-10-291-1/+1
| | | | | | | | | | | | | | | | 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.
* Make Active Record tests pass in isolationRafael Mendonça França2012-10-291-2/+1
| | | | Also remove the feature detecting for Ruby 1.9
* Merge pull request #7593 from veader/patch-1Rafael Mendonça França2012-10-281-0/+2
| | | | | | | Decode attributes pulled from URI.parse Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/connection_adapters/connection_specification.rb
* Synchronize around deleting from the reserved connections hash.Aaron Patterson2012-10-151-1/+1
| | | | Fixes #7955
* ConnectionPool accepts spec key 'checkout_timeout'Jonathan Rochkind2012-09-241-3/+9
| | | | | | | 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'.
* Revert "backport fair connection pool 02b2335563 to 3-2-stable"Rafael Mendonça França2012-09-201-190/+49
| | | | | | | | | | | | | 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
* backport fair connection pool 02b2335563 to 3-2-stableJonathan Rochkind2012-09-171-49/+190
|
* Table#remove passed an array to remove_column, which is deprecated.Joe Rafaniello2012-08-181-1/+1
| | | | See 02ca9151a043a4fefbb3f22edd05f0cd392fffaa
* Merge pull request #6985 from sidonath/disable-query-cache-for-locksRafael Mendonça França2012-07-061-1/+9
| | | | | | Disable query cache for lock queries Conflicts: activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
* Merge pull request #6900 from cbandy/issue-6898Carlos Antonio da Silva2012-06-281-0/+2
| | | | | | Require URI in ConnectionSpecification Conflicts: activerecord/lib/active_record/connection_adapters/connection_specification.rb
* Synchronize the ConnectionPool#release method to avoid thread safety issues ↵Andrew Selder2012-05-231-10/+12
| | | | | | | | | | | | | | | | | | | | [#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'
* Merge pull request #6398 from pmahoney/threadsafe-connection-poolAaron Patterson2012-05-191-4/+8
| | | | Synchronize read and modification of @reserved_connections
* Stop showing deprecations for Ruby 1.8.7 with remove_columnCarlos Antonio da Silva2012-05-091-2/+4
| | | | | String is Enumerable in 1.8.7, which means that passing a String to remove_column was generating deprecation warnings during tests.
* Deprecate remove_column with array as an argumentPiotr Sarnacki2012-05-021-0/+6
|
* ConnectionPool.checkout takes account of ruby using 'non-blocking condition ↵Jonathan Rochkind2012-03-131-9/+18
| | | | variables' in mutex ConditionVariables
* make sure connections returned after close are marked as in_useAaron Patterson2012-03-121-0/+16
|
* inline docs for clear_active_connections! no longer says it cleans dead ↵Jonathan Rochkind2012-03-121-3/+1
| | | | threads, it doesn't since 3.2.0
* make active_connection? return true only if there is an open connection in ↵Aaron Patterson2012-03-081-3/+4
| | | | use for the current thread. fixes #5330
* revert setting NOT NULL constraints in add_timestampsXavier Noria2012-03-011-2/+2
| | | | | | | | | | | 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.
* Revert "No need to pass options which is never used"Rafael Mendonça França2012-02-261-2/+2
| | | | | | | | | Options is needed for some Rails extensions to determine when referential integrity should be disabled This reverts commit bcb466c543451dce69403aaae047295758589d8e. Fixes #5052
* prepared statements can be disabledAaron Patterson2012-02-212-8/+10
|
* Fix Issue #4819densya2032012-02-041-1/+1
| | | | | | 'uninitialized constant ActiveRecord::Deprecation in Rails3.2.1' Just a typo of 'ActiveSupport::...'
* query cache instrumentation should included the bindings in the payload ↵Xavier Noria2012-01-301-1/+1
| | | | [closes #4750]
* Document that index names are made up of all columns, not just the first.Jo Liss2011-12-291-9/+2
| | | | | | | | | | | 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.
* Revert naive O(1) table_exists? implementation.Jon Leighton2011-12-131-6/+1
| | | | | | | | | | 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.
* don't need a begin / end.Aaron Patterson2011-12-091-6/+4
|
* squelch table exists? queries.Aaron Patterson2011-12-091-1/+1
|
* Exceptions should read from the spec configuAaron Patterson2011-12-081-1/+1
|
* fix nodocsVijay Dev2011-12-091-3/+3
|
* fix commentsVijay Dev2011-12-091-4/+2
|
* Use a hash to look up column definitionsAaron Patterson2011-12-071-2/+3
|
* try to normalize the objects passed to column()Aaron Patterson2011-12-071-9/+11
|
* automatically add the column definition to the columns list if creating a ↵Aaron Patterson2011-12-071-12/+21
| | | | new one
* stop calling String#to_s so frequentlyAaron Patterson2011-12-071-3/+4
|
* Quitoting the table name before querying.Aaron Patterson2011-12-051-1/+1
|
* Speed up table_exists? for databases with a large number of tablesJade Rubick2011-12-051-1/+6
| | | | | | 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.
* push synchronization in to each method. Reduces method calls and makesAaron Patterson2011-11-291-25/+29
| | | | it clear which methods are synchronized.
* Automatic closure of connections in threads is deprecated. For exampleAaron Patterson2011-11-291-1/+7
| | | | | | | | | | | | | | | | | 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.
* AbstractAdapter#close can be called to add the connection back to theAaron Patterson2011-11-291-0/+1
| | | | pool.
* Start implementing @reserved_connections in terms of connection leases.Aaron Patterson2011-11-291-3/+3
|
* Rename `checked_out` to more descriptive `active_connections`Aaron Patterson2011-11-291-3/+3
|
* Use connection lease to determine "checked_out" connectionsAaron Patterson2011-11-291-17/+21
|
* Deprecate set_primary_key in favour of self.primary_key=Jon Leighton2011-11-291-1/+1
|
* respond_to? information of AR is not the responsibility of the specAaron Patterson2011-11-291-7/+9
| | | | resolver.
* remove unused instance variableAaron Patterson2011-11-281-1/+0
|
* just check in all connectionsAaron Patterson2011-11-281-6/+2
|