#32527: needs_rollback flag issue with implementation of backend that does not
support savepoint
-------------------------------------+-------------------------------------
     Reporter:  Hemant Bhanawat      |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  savepoint            |             Triage Stage:
  needs_rollback database backend    |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Hemant Bhanawat):

 * status:  closed => new
 * resolution:  needsinfo =>


Comment:

 Before Django 2.0, sql server had different handling.
 {{{
 if not connection.get_autocommit():
                 # Some database adapters (namely sqlite3) don't handle
                 # transactions and savepoints properly when autocommit is
 off.
                 # Turning autocommit back on isn't an option; it would
 trigger
                 # a premature commit. Give up if that happens.
                 if connection.features.autocommits_when_autocommit_is_off:
                     raise TransactionManagementError(
                         "Your database backend doesn't behave properly
 when "
                         "autocommit is off. Turn it on before using
 'atomic'.")
 }}}

 Please create a dummy backend with the following two settings or may be
 try to change an existing one and add these two settings and you will hit
 this issue.

 {{{

     uses_savepoints= False
     can_release_savepoints = False
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32527#comment:2>
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/067.b37e7606e5c470ab6a2cc949ea8d13f7%40djangoproject.com.

Reply via email to