#2705: [patch] Add optional FOR UPDATE clause to QuerySets
---------------------------------------------------+------------------------
          Reporter:  Hawkeye                       |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  1     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  1                             |  
---------------------------------------------------+------------------------
Comment (by liangent):

 Replying to [comment:40 ikelly]:
 > I've found the problem -- turns out it has nothing to do with Oracle.
 It's [http://bugs.python.org/issue1868 Python bug 1868] combined with
 setting {{{DEBUG=True}}} in the settings file; I had that set in my oracle
 test settings file, but not in my postgres or mysql files.  With
 {{{DEBUG=True}}} set, the cursor gets wrapped in a
 {{{CursorDebugWrapper}}}, which has a {{{finally}}} clause in its
 {{{execute}}} method that accesses an attribute of the
 {{{ConnectionWrapper}}} object, triggering the bug.
 >
 > I don't think this is likely to be a major issue outside of the test
 suite, so I wouldn't object to moving the rollback in
 {{{handle_deadlock}}} back to its original location, as long as we do
 something in the test to make sure it doesn't hang.
 >
 > Also, I think {{{select_for_update}}} is the wrong place to set the
 transaction dirty.  That needs to happen when the query is run, not when
 the queryset is constructed, which is not necessarily the same time.

 anyhow, transaction should be set dirty after SELECT FOR UPDATE was
 executed.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2705#comment:42>
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to