Opened 13 years ago

Closed 11 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

Description

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 13 years ago.

Download all attachments as: .zip

Change History (8)

by Chris Lamb, 13 years ago

Attachment: sqlite-savepoints.diff added

comment:1 by Russell Keith-Magee, 13 years ago

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 by Łukasz Rekucki, 13 years ago

Severity: Normal
Type: New feature

comment:3 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:4 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:5 by Andrei Antoukh, 12 years ago

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 (http://apidoc.apsw.googlecode.com/hg/pysqlite.html#what-apsw-does-better)

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: https://gist.github.com/3061376

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

comment:6 by Andrei Antoukh, 12 years ago

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 12 years ago by Andrei Antoukh (previous) (diff)

comment:7 by Claude Paroz, 11 years ago

Resolution: duplicate
Status: newclosed

This was already reported in #13742.

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