aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | 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.
* | | | | changed xml type datetime to dateTime, fixes #6328Angelo capilleri2012-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XmlMini define the xml 'datatime', but according to http://www.w3.org/TR/xmlschema-2/#dateTime could be better change this to 'dateTime' with upper case letter 'T. So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime' add the changing to the changelog
* | | | | 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.
* | | | | Merge pull request #6368 from Antiarchitect/store-indifferent-accessJeremy Kemper2012-05-221-10/+27
|\ \ \ \ \ | | | | | | | | | | | | Support migrating from Hash to HashWithIndifferentAccess for accessing attributes.
| * | | | | Convert Hash to HashWithIndifferentAccess in ActiveRecord::Store.Andrey Voronkov2012-05-221-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make migration from 3.x apps easier, we should try to convert Hash instances to HashWithIndifferentAccess, to allow accessing values with both symbol and a string. This is follow up to changes in 3c0bf043.
* | | | | | Restore the frozen state on rollback. Fixes #6417.Godfrey Chan2012-05-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Refactor aggregation writer methodCarlos Antonio da Silva2012-05-211-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Only constantize class_name once.
* | | | | | Merge pull request #6416 from pmahoney/threadsafe-connection-poolAaron Patterson2012-05-211-34/+86
|\ \ \ \ \ \ | | | | | | | | | | | | | | Make connection pool fair with respect to waiting threads.
| * | | | | | Make connection pool fair with respect to waiting threads.Patrick Mahoney2012-05-201-34/+86
| | | | | | |
* | | | | | | Merge pull request #6143 from senny/composed_of_converter_returns_nilAaron Patterson2012-05-211-7/+8
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | allow the :converter Proc form composed_of to return nil
| * | | | | | allow the :converter Proc form composed_of to return nilYves Senn2012-05-031-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to filter invalid input values before they are passed into the value-object (like empty strings). This behaviour is only relevant if the :allow_nil options is set to true. Otherwise you will get the resulting NoMethodError.
* | | | | | | Merge pull request #6397 from kennyj/fix_translate_exceptionAaron Patterson2012-05-191-3/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix a problem of translate_exception method in a Japanese (non English) environment.
| * | | | | | | Fix a problem of translate_exception method in Japanese.kennyj2012-05-201-3/+7
| | |_|/ / / / | |/| | | | |
* / | | | | | Synchronize read and modification of @reserved_connections hash to avoid ↵Patrick Mahoney2012-05-191-4/+8
|/ / / / / / | | | | | | | | | | | | | | | | | | concurrency error.
* | | | | | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-05-194-23/+305
|\ \ \ \ \ \
| * | | | | | copy edits [ci skip]Vijay Dev2012-05-191-17/+20
| | | | | | |
| * | | | | | add CollectionProxy#last documentationFrancesco Rodriguez2012-05-191-0/+27
| | | | | | |
| * | | | | | add CollectionProxy#first documentationFrancesco Rodriguez2012-05-191-0/+27
| | | | | | |
| * | | | | | Revert "You can add a custom primary key to a table"Vijay Dev2012-05-191-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 23a98ffbd9b39ee70094ded1671cf1879d0d3591. [ci skip]
| * | | | | | improve CollectionProxy#concat documentationFrancesco Rodriguez2012-05-191-7/+18
| | | | | | |
| * | | | | | fix CollectionProxy#<< documentationFrancesco Rodriguez2012-05-191-1/+1
| | | | | | |
| * | | | | | add CollectionProxy#<< documentationFrancesco Rodriguez2012-05-191-0/+20
| | | | | | |
| * | | | | | add CollectionProxy#clear documentationFrancesco Rodriguez2012-05-191-0/+26
| | | | | | |
| * | | | | | add CollectionProxy#include? documentationFrancesco Rodriguez2012-05-181-0/+13
| | | | | | |
| * | | | | | You can add a custom primary key to a tableAvi Tzurel2012-05-191-0/+5
| | | | | | |
| * | | | | | move docs from CollectionAssociation to CollectionProxyFrancesco Rodriguez2012-05-182-114/+143
| | | | | | |
| * | | | | | add explanation of raising errors when a limit scope is supplied in ↵Francesco Rodriguez2012-05-181-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Relation#delete_all
| * | | | | | Fix typo.Peter Suschlik2012-05-181-1/+1
| | | | | | |
| * | | | | | remove incorrect example of CollectionAssociation#empty?Francesco Rodriguez2012-05-181-17/+0
| | | | | | |
| * | | | | | add docs to CollectionAssociation#empty?Francesco Rodriguez2012-05-181-3/+32
| | | | | | |
| * | | | | | add docs to CollectionAssociation#any?Francesco Rodriguez2012-05-181-0/+30
| | | | | | |
| * | | | | | add examples to CollectionAssociation#concatFrancesco Rodriguez2012-05-181-3/+14
| | | | | | |
| * | | | | | fix CollectionAssociation docsFrancesco Rodriguez2012-05-171-1/+1
| | | | | | |
| * | | | | | add example to CollectionAssociation#destroy_allFrancesco Rodriguez2012-05-171-3/+14
| | | | | | |
| * | | | | | add more explanation to CollectionAssociation docsFrancesco Rodriguez2012-05-171-0/+4
| | | | | | |
| * | | | | | add CollectionAssociation hierarchyFrancesco Rodriguez2012-05-171-2/+7
| | | | | | |
| * | | | | | add docs to CollectionAssociation#many?Francesco Rodriguez2012-05-171-1/+34
| | | | | | |
| * | | | | | fix CollectionAssociation#replace docsFrancesco Rodriguez2012-05-171-3/+3
| | | | | | |
| * | | | | | Add docs to CollectionAssociation#replaceFrancesco Rodriguez2012-05-171-3/+23
| | | | | | |
* | | | | | | Merge pull request #4835 from ↵Carlos Antonio da Silva2012-05-191-3/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pacoguzman/refactor_define_restrict_dependency_method Refactor define_restrict_dependency_method using reflection
| * | | | | | | Refactor define_restrict_dependency_method using reflectionPaco Guzman2012-02-011-3/+3
| | | | | | | |
* | | | | | | | Ensure that CollectionAssociation#replace returns proper targetPiotr Sarnacki2012-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix commited in e2a070c was returning the `new_target`, as a try to return whatever user replaced association with. The problem is, the resulting association target may be ordered differently. In such case we want to return the target that will be later used for that association.
* | | | | | | | Merge pull request #6376 from jgaskins/timestamp-microsecondsJeremy Kemper2012-05-181-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Increase numeric-timestamp precision to nanoseconds
| * | | | | | | | Increase `AR#cache_key` precision to nanosecondsJamie Gaskins2012-05-191-1/+1
| | |_|_|/ / / / | |/| | | | | |
* | | | | | | | fix #delete_all with habtm with :delete_sqlJon Leighton2012-05-181-0/+1
| | | | | | | |
* | | | | | | | no longer need #delete_all_on_destroyJon Leighton2012-05-185-17/+2
| | | | | | | |
* | | | | | | | Perf: Don't load the association for #delete_all.Jon Leighton2012-05-184-10/+35
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Bug #6289
* | | | | | | Merge pull request #6238 from pwnall/pgsql_bytea_limitAaron Patterson2012-05-171-8/+19
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Postgresql doesn't accept limits on binary (bytea) columns.
| * | | | | | | Postgresql doesn't accept limits on binary (bytea) columns.Victor Costan2012-05-091-8/+19
| | | | | | | |
* | | | | | | | Don't destroy readonly modelsJohannes Barre2012-05-171-0/+1
| | | | | | | |