> --
> You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
> To post to this group, send email to sqlal...@googlegroups.com.
> To unsubscribe from this group, send email to sqlalchemy+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
>
then yes, for your case this is exactly the pysqlite bug Daniel mentions: http://code.google.com/p/pysqlite/issues/detail?id=21 . Pysqlite doesn't open the transaction until DML is encountered specifically to reduce file locks. This should be configurable, as well as the type of BEGIN emitted. SQLAlchemy itself never emits BEGIN.
On Wed, 2011-04-27 at 11:21 -0700, Clay Gerrard wrote:
> ... and all connections would automatically issue the correct begin
> statement and acquire a reserved lock at the beginning of the
> transaction. But as it is, they don't do anything until they get down
> to the update, and it's kind of a disaster.
I had this disaster a number of times as well. For that reason I created
a patch for this issue http://bugs.python.org/issue10740
That change makes the time when pysqlite starts a transaction
configurable. The obvious approach to start a transaction on each
command breaks "pragma foreign_keys=on" since it has to be used outside
a transaction.
I welcome comments and suggestions about that patch.
Greetings, Torsten
--
DYNAmore Gesellschaft fuer Ingenieurdienstleistungen mbH
Torsten Landschoff
Office Dresden
Tel: +49-(0)351-4519587
Fax: +49-(0)351-4519561
mailto:torsten.l...@dynamore.de
http://www.dynamore.de
Registration court: Mannheim, HRB: 109659, based in Karlsruhe,
Managing director: Prof. Dr. K. Schweizerhof, Dipl.-Math. U. Franz