aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
Commit message (Collapse)AuthorAgeFilesLines
* Add more options to column_exists? methodAleksey Magusev2012-06-301-4/+6
| | | | Also fix failures in check options for nil
* add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-221-1/+1
|
* Avoid unnecessary catching of Exception instead of StandardError.Dylan Smith2012-06-171-2/+2
|
* Simplify AR configuration code.Jon Leighton2012-06-151-6/+8
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* Merge pull request #6492 from pmahoney/fair-connection-pool2Rafael Mendonça França2012-06-111-37/+174
|\ | | | | | | | | | | | | Fair connection pool2 Conflicts: activerecord/test/cases/associations/eager_test.rb
| * Make connection pool fair with respect to waiting threads.Patrick Mahoney2012-05-251-37/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Symbol responds_to :upcase & :downcase in Ruby >= 1.9Akira Matsuda2012-06-061-1/+1
| |
* | Work around undiagnosed bug that's draining a relation's bind_valuesJeremy Kemper2012-05-311-0/+1
| |
* | SchemaMigration should be loaded lazily.kennyj2012-05-291-1/+0
|/
* Whitespaces :scissors:Rafael Mendonça França2012-05-231-6/+6
|
* ConnectionPool wait_timeout no longer used for different types of timeouts. ↵Jonathan Rochkind2012-05-231-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #6441 An AR ConnectionSpec `wait_timeout` is pre-patch used for three different things: * mysql2 uses it for MySQL's own wait_timeout (how long MySQL should allow an idle connection before closing it), and defaults to 2592000 seconds. * ConnectionPool uses it for "number of seconds to block and wait for a connection before giving up and raising a timeout error", default 5 seconds. * ConnectionPool uses it for the Reaper, for deciding if a 'dead' connection can be reaped. Default 5 seconds. Previously, if you want to change these from defaults, you need to change them all together. This is problematic _especially_ for the mysql2/ConnectionPool conflict, you will generally _not_ want them to be the same, as evidenced by their wildly different defaults. This has caused real problems for people #6441 #2894 But as long as we're changing this, forcing renaming the ConnectionPool key to be more specific, it made sense to seperate the two ConnectionPool uses too -- these two types of ConnectionPool timeouts ought to be able to be changed independently, you won't neccesarily want them to be the same, even though the defaults are (currently) the same.
* Revert "Merge pull request #6416 from pmahoney/threadsafe-connection-pool"Rafael Mendonça França2012-05-221-86/+34
| | | | | | | | | | | | This reverts commit d2901f0fc4270a765717ad572d559dc49a56b3a8, reversing changes made to 525839fdd8cc34d6d524f204528d5b6f36fe410c. Conflicts: activerecord/test/cases/connection_pool_test.rb Reason: This change broke the build (http://travis-ci.org/#!/rails/rails/builds/1391490) and we don't have any solution until now. I asked the author to try to fix it and open a new pull request.
* Make connection pool fair with respect to waiting threads.Patrick Mahoney2012-05-201-34/+86
|
* Synchronize read and modification of @reserved_connections hash to avoid ↵Patrick Mahoney2012-05-191-4/+8
| | | | concurrency error.
* Integer limit out of range should be allowed to raise. Closes #6272Erich Menge2012-05-161-1/+1
|
* remove unnecessary 'examples' noise [ci skip]Vijay Dev2012-05-112-28/+18
|
* Merge pull request #5362 from zenprogrammer/quoting_bugAaron Patterson2012-05-091-0/+1
|\ | | | | Fixed bug in ActiveRecord that caused classes to be quoted incorrectly
| * Fixed bug in Quoting that caused classes to be quoted incorrectlyRyan Oblak2012-03-091-0/+1
| |
* | Refactored remove_columnEdgars Beigarts2012-05-022-3/+1
| |
* | Remove unused assignmentsMark Rushakoff2012-04-291-5/+3
| |
* | Merge pull request #5698 from dougcole/support_postgresql_partitioningAaron Patterson2012-04-271-2/+2
|\ \ | | | | | | Support postgresql partitioning by making INSERT RETURNING optional
| * | add use_returning as a postgresql connection configDoug Cole2012-03-311-2/+2
| | |
* | | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-04-181-1/+1
|\ \ \
| * | | Fix typo on the add_index.kennyj2012-04-131-1/+1
| | | |
* | | | opening a connection will block if the pool is fullAaron Patterson2012-04-151-20/+39
| | | |
* | | | Automatically create indexes for references/belongs_to statements in migrations.Joshua Wood2012-04-142-4/+21
|/ / /
* | | Fix delete_all when chained with joins.Rafael Mendonça França2012-04-101-3/+17
| | | | | | | | | | | | Closes #5202 and #919
* | | Merge pull request #5716 from jurriaan/tr-gsub-cleanupSantiago Pastorino2012-04-041-1/+1
|\ \ \ | | | | | | | | Updated/changed unneeded tr/gsubs
| * | | Updated/changed useless tr/gsubsJurriaan Pruis2012-04-031-1/+1
| |/ /
* / / Remove unnecessary articles.Waseem Ahmad2012-04-031-3/+3
|/ /
* | Use one 'be'.Waseem Ahmad2012-03-241-1/+1
| |
* | make sure connections returned after close are marked as in_useAaron Patterson2012-03-121-4/+17
| |
* | deprecated clear_stale_active_connections! can call #reap instead of ↵Jonathan Rochkind2012-03-121-1/+2
| | | | | | | | no-op'ing, #reap does the same thing
* | make active_connection? return true only if there is an open connection in ↵Aaron Patterson2012-03-081-7/+4
| | | | | | | | use for the current thread. fixes #5330
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-03-031-0/+3
|\ \ | |/ |/|
| * Add documentation for IndexDefinition.Waseem Ahmad2012-03-021-0/+3
| |
* | 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.
* use bind values for join columnsAaron Patterson2012-02-271-4/+4
|
* removes verify_active_connections!Xavier Noria2012-02-241-15/+0
| | | | | | | The method verify_active_connections! was used in the old days (up to 2.1 I think) by the dispatcher to verify the connections, but nowadays we do that in a different way and this method is obsolete.
* prepared statements can be disabledAaron Patterson2012-02-212-8/+10
|
* use Process.pid rather than $$Aaron Patterson2012-02-161-5/+5
|
* database connections are automatically established after forking.Aaron Patterson2012-02-161-13/+47
| | | | Connection pools are 1:1 with pids.
* Revert "No need to pass options which is never used"Rafael Mendonça França2012-02-151-2/+2
| | | | | | | | | Options is needed for some Rails extensions to determine when referential integrity should be disabled This reverts commit bcb466c543451dce69403aaae047295758589d8e. Fixes #5052
* Made schema dumper recognize partial indices' where statementsMarcelo Silveira2012-02-091-1/+1
|
* Added where option to add_index to support postgresql partial indicesMarcelo Silveira2012-02-091-3/+13
| | | | | | | | | | | The `add_index` method now supports a `where` option that receives a string with the partial index criteria. add_index(:accounts, :code, :where => "active") Generates CREATE INDEX index_accounts_on_code ON accounts(code) WHERE active
* Remove useless argument in #columns.Sebastian Martinez2012-02-021-1/+1
|
* QueryCache will just dup an AR::Result, AR::Result can deep copyAaron Patterson2012-01-311-9/+15
|
* query cache instrumentation should included the bindings in the payload ↵Xavier Noria2012-01-301-1/+1
| | | | [closes #4750]
* Add `create_join_table` migration helper to create HABTM join tablesRafael Mendonça França2012-01-271-0/+42
|
* Only show the type if column is presentRafael Mendonça França2012-01-231-1/+2
|