Opened 5 years ago

Closed 3 years ago

#15506 closed New feature (duplicate)

Savepoint support for sqlite3 backend

Reported by: lamby Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Normal Keywords:
Cc: lamby, 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 lamby 5 years ago.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by lamby

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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 5 years ago by lrekucki

  • Severity set to Normal
  • Type set to New feature

comment:3 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:4 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:5 Changed 4 years ago by niwi

  • 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 4 years ago by niwi

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 4 years ago by niwi (previous) (diff)

comment:7 Changed 3 years ago by claudep

  • Resolution set to duplicate
  • Status changed from new to closed

This was already reported in #13742.

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