Changes between Initial Version and Version 1 of Ticket #32527


Ignore:
Timestamp:
Mar 9, 2021, 3:29:53 AM (4 years ago)
Author:
Mariusz Felisiak
Comment:

Thanks for this report, however I'm not able to confirm (with the given details) that it is an issue in Django. As far as I'm aware it should work properly. In Django < 2.0 we supported SQLite < 3.7.5 with the same configuration (see 27193aea0088b238e3ee0f0f235364a34a09265c) and it worked fine. You can try to create a topic on the https://forum.djangoproject.com or a discussion on DevelopersMailingList.

Feel-free to reopen the ticket when you can provide more details and prove it's an issue in Django.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32527

    • Property Resolutionneedsinfo
    • Property Status newclosed
  • Ticket #32527 – Description

    initial v1  
    88
    99The problem stems from the following code of __enter__ function in transaction.py
    10 
     10{{{
    1111            if self.savepoint and not connection.needs_rollback:
    1212                sid = connection.savepoint()
     
    1414            else:
    1515                connection.savepoint_ids.append(None)
    16 
     16}}}
    1717Basically, a None is inserted in the savepoint_ids when the savepoints are not supported. And the following code in __exit__ function of transaction.py, it sets needs_rollback as true:
    18 
     18{{{
    1919                    if sid is None:
    2020                        connection.needs_rollback = True
    21 
     21}}}
    2222Can someone please clarify if this is an issue with the code or there is something else that we can do at our layer. For the time being, we have overridden the function savepoint of DatabaseWrapper to return 1. And, we ask the users of our backend to not set savepoint=true in parameters of transaction.atomic().
    23 
     23{{{
    2424    def savepoint(self):
    2525             return 1
     26}}}
Back to Top