#34523: Model.objects.update_or_create method sometimes raises
TransactionManagementError
-------------------------------------+-------------------------------------
     Reporter:  gatello-s            |                    Owner:  Mariusz
                                     |  Felisiak
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  update_or_create     |             Triage Stage:  Accepted
  TransactionManagementError         |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"83339d2103f447377fedb3bd145b52c3ef2b667c" 83339d21]:
 {{{
 #!CommitTicketReference repository=""
 revision="83339d2103f447377fedb3bd145b52c3ef2b667c"
 Fixed #34523 -- Fixed TransactionManagementError in
 QuerySet.update_or_create() with MyISAM storage engine.

 QuerySet.update_or_create() uses nested atomic to handle possible
 integrity errors taking savepoints as way to mark back the connection
 as usable. Savepoints are not returned when
 uses_savepoints/can_release_savepoints feature flags are set to False.
 As a consequence, QuerySet.update_or_create() assumed the outer atomic
 block is tainted and raised TransactionManagementError.

 This commit partly reverts 331a460f8f2e4f447b68fba491464b68c9b21fd1.

 Thanks gatello-s for the report.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34523#comment:19>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070187e0312975-32da191b-d45b-4736-9410-7af17e54705b-000000%40eu-central-1.amazonses.com.

Reply via email to