Opened 14 years ago
Closed 12 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)
Change History (8)
by , 14 years ago
Attachment: | sqlite-savepoints.diff added |
---|
comment:1 by , 14 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:5 by , 12 years ago
Cc: | 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 , 12 years ago
I think you 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.
comment:7 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This was already reported in #13742.
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.