Opened 12 years ago

Closed 10 years ago

#15506 closed New feature (duplicate)

Savepoint support for sqlite3 backend

Reported by: Chris Lamb Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Normal Keywords:
Cc: Chris Lamb, niwi@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


We can enable savepoints on sqlite if the user has set isolation_level=None in their OPTIONS dict (or they have otherwise set the isolation_level to None) on the django.db.connections.connection sqlite instance. The default is '' (empty string).

Patch attached.

Attachments (1)

sqlite-savepoints.diff (1.3 KB) - added by Chris Lamb 12 years ago.

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by Chris Lamb

Attachment: sqlite-savepoints.diff added

comment:1 Changed 12 years ago by Russell Keith-Magee

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

As with #15507 -- if SQLite supports a feature, we should to.

Same comment goes for the patch -- are you sure the feature check is correct? Has this feature always been available? What are you basing your assertion about autocommit upon (I can't find any reference to this limitation from a quick scan of the SQLite docs on savepoints)

See also #14204 -- support for FK constraints in SQLite.

comment:2 Changed 12 years ago by Łukasz Rekucki

Severity: Normal
Type: New feature

comment:3 Changed 11 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:4 Changed 11 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:5 Changed 11 years ago by Andrei Antoukh

Cc: niwi@… added

I could not find the official announcement, but according to the documentation of APSW:

Savepoints were introduced in SQLite 3.6.8 (

I've done my own tests, comments in the code that clarify some things that I found and contrasting with official documentation of sqlite and pysqlite:

This case is very similar to #14204, the difference is the minimum version of sqlite.

comment:6 Changed 11 years ago by Andrei Antoukh

I think we should go deprecating older versions of sqlite to equal what is being done with support for versions of python. And take advantage of the new things that are incorporated sqlite.

Last edited 11 years ago by Andrei Antoukh (previous) (diff)

comment:7 Changed 10 years ago by Claude Paroz

Resolution: duplicate
Status: newclosed

This was already reported in #13742.

Note: See TracTickets for help on using tickets.
Back to Top