1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

15 commits

Author SHA1 Message Date
Jamis Buck
83752373b9 Made increment_counter/decrement_counter play nicely with optimistic locking, and added a more general update_counters method
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-07 16:10:40 +00:00
Michael Koziarski
84481dd3b4 Sybase adapter fixes. Closes #6926 [jsheets]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-05 00:12:06 +00:00
Jeremy Kemper
50c98942a5 Don't do introspection queries during locking tests [Michael Schoen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5689 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-06 20:28:26 +00:00
Jeremy Kemper
8dea60b0c3 find supports :lock with :include. Check whether your database allows SELECT ... FOR UPDATE with outer joins before using. Closes #6764.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-05 22:07:55 +00:00
Jeremy Kemper
70840d4b7f Oracle: resolve test failures, use prefetched primary key for inserts, check for null defaults. Factor out some common methods from all adapters. Closes #6515.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-01 20:28:48 +00:00
Jeremy Kemper
528618a910 Optimistic locking: gracefully handle nil versions, treat as zero. Closes #5908.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 00:02:38 +00:00
Jeremy Kemper
5ad4f1ad94 SQLServer: added tests to ensure all database statements are closed, refactored identity_insert management code to use blocks, removed update/delete rowcount code out of execute and into update/delete, changed insert to go through execute method, removed unused quoting methods, disabled pessimistic locking tests as feature is currently unsupported, fixed RakeFile to load sqlserver specific tests whether running in ado or odbc mode, fixed support for recently added decimal types, added support for limits on integer types. Closes #5670.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4601 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 18:24:35 +00:00
Jeremy Kemper
2a12b56841 r4704@asus: jeremy | 2006-06-27 12:00:19 -0700
decimal
 r4705@asus:  jeremy | 2006-06-27 12:20:47 -0700
 current_adapter? checks whether any of its arguments is the name of the current adapter class
 r4834@asus:  jeremy | 2006-07-08 13:08:24 -0700
 Room to float.
 r4835@asus:  jeremy | 2006-07-08 13:09:18 -0700
 Give lock test a few chances.
 r4836@asus:  jeremy | 2006-07-08 13:12:05 -0700
 Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. Closes #5454.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 20:35:56 +00:00
Jeremy Kemper
c4782f7393 More succinct current_adapter? Enable locking duel for Oracle.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 10:48:43 +00:00
Jeremy Kemper
ef77ec7710 r4669@asus: jeremy | 2006-06-20 12:53:36 -0700
Getting picayune with locking_test.  Closes #4871.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-20 19:54:35 +00:00
Jeremy Kemper
722e0b6a8b r4664@asus: jeremy | 2006-06-19 18:55:36 -0700
Use the #lock method to obtain a row lock on a single record. Simply reloads the record with :lock => true.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4462 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-20 01:58:36 +00:00
Jeremy Kemper
15aa6e0552 r4644@asus: jeremy | 2006-06-16 14:57:03 -0700
locking
 r4645@asus:  jeremy | 2006-06-17 12:41:30 -0700
 missing reply fixture
 r4646@asus:  jeremy | 2006-06-19 13:05:23 -0700
 Use a per-thread (rather than global) transaction mutex so you may execute concurrent transactions on separate connections.
 r4647@asus:  jeremy | 2006-06-19 13:07:23 -0700
 PostgreSQL: introduce allow_concurrency option which determines whether to use blocking or asynchronous #execute. Adapters with blocking #execute will deadlock Ruby threads. The default value is ActiveRecord::Base.allow_concurrency.
 r4648@asus:  jeremy | 2006-06-19 13:08:40 -0700
 Pass the default allow_concurrency when instantiating new connections.
 r4649@asus:  jeremy | 2006-06-19 13:11:12 -0700
 Break out concurrent transaction tests and run them for PostgreSQLAdapter only (need to fork or system('some_test_script') for the other adapters)
 r4650@asus:  jeremy | 2006-06-19 13:42:48 -0700
 Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE".
 r4661@asus:  jeremy | 2006-06-19 15:36:51 -0700
 excise the junk mutex


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-19 22:48:51 +00:00
Michael Koziarski
a471e6b4d7 allow the 'lock_version' column to be configured with set_locking_column. Closes #3402
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-14 09:36:52 +00:00
Jamis Buck
2c0fa32088 Do not use instantiated fixtures (in general) in tests. Also, support the use of transactional fixtures by setting the AR_TX_FIXTURES environment variable to "yes".
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-10 14:58:02 +00:00
David Heinemeier Hansson
fbf9281f0e Added automated optimistic locking if the field lock_version is present #384 [Michael Koziarski]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@295 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-31 19:38:04 +00:00