#2705: [patch] Add optional FOR UPDATE clause to QuerySets
-------------------------------------+-------------------------------------
Reporter: Hawkeye | Owner: brunobraga
Type: New | Status: assigned
feature | Component: Database layer
Milestone: | (models, ORM)
Version: SVN | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 |
-------------------------------------+-------------------------------------
Comment (by danfairs):
Replying to [comment:79 carljm]:
I've updated the patch to 2705-for_update-r16022.diff.
> Have you run the full test suite with this patch applied, at least on
the commonly-available DB backends where the suite takes reasonable time
(SQLite, Postgres)?
I've now run the full suite on PostgreSQL, MySQL and SQLite with the
latest version of the patch. I get a single failure before the patch is
applied, which remains after the patch with PostgreSQL and SQLite - so no
more failures. Similar situation with MySQL, only there are two failures
(one in common with the PostgreSQL and SQLite backends). For reference,
the common failure is:
{{{
======================================================================
FAIL: test_view_decorator
(regressiontests.cache.tests.CacheMiddlewareTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/dan/virtual/django/src/django/tests/regressiontests/cache/tests.py",
line 1443, in test_view_decorator
self.assertEqual(response.content, 'Hello World 18')
AssertionError: 'Hello World 10' != 'Hello World 18'
}}}
MySQL additionally has this failure:
{{{
======================================================================
FAIL: testI18NWithLocalePaths
(regressiontests.views.tests.i18n.JsI18NTestsMultiPackage)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/dan/virtual/django/src/django/tests/regressiontests/views/tests/i18n.py",
line 160, in testI18NWithLocalePaths
self.assertContains(response, javascript_quote('este texto de app3
debe ser traducido'))
File "/home/dan/virtual/django/src/django/django/test/testcases.py",
line 425, in assertContains
msg_prefix + "Couldn't find '%s' in response" % text)
AssertionError: Couldn't find 'este texto de app3 debe ser traducido' in
response
}}}
The Oracle tests seem very broken both before and after this patch is
applied (though the tests specific to the feature on Oracle pass fine, and
I had a clean run back against trunk r15174).
I don't think the failures are related to this patch.
>
> There's a "select_related" where it should be "select_for_update" in the
documentation section of this patch.
Fixed.
--
Ticket URL: <http://code.djangoproject.com/ticket/2705#comment:83>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.