Re: [pysqlite] database locked
Gerhard Häring <[email protected]> Mon, 02 Jun 2008 10:16:36 +0200
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Dennis Lee Bieber wrote: > On Mon, 02 Jun 2008 09:19:27 +0200, Gerhard Häring > <[email protected]> declaimed the following in > gmane.comp.python.db.pysqlite.user: > >> Wrong! There are only two possibilities where pysqlite commits. >> >> 1) You call .commit() on the connection object >> 2) You execute a DDL statement (CREATE TABLE/CREATE VIEW/...). pysqlite >> then does an implicit COMMIT before these >> > Very well -- I was just trying to paraphrase the boxed text on page > 314 of "The {no longer} Definitive Guide to SQLite". > > Perhaps the behavior has been changed since that section of the book > was written? What you state is now closer to how I feel it should have > behaved. [...] It always was like this. I've looked as far back as pysqlite 2.0.alpha2 (Sun Mar 13 23:50:16 2005), which is the oldest version of the pysqlite2 branch I have in my repository: switch (statement_type) { case STATEMENT_UPDATE: case STATEMENT_DELETE: case STATEMENT_INSERT: func_args = PyTuple_New(0); if (!args) return NULL; result = connection_begin(self->connection, func_args); -- Gerhard