> > > I believe so. The shared lock does not last forever -- only as long as > it > > takes to execute the select. Once the data have been read, the shared > lock > > (for that particular select) is released. > > Yes, if autocommit is on. The part you didn't quote was that > autocommit can be disabled in which case a SHARED lock is held. >
No, when autocommit is disabled, that doesn't immediately result in a shared lock being acquired and held indefinitely. A shared lock is acquired when a select is made, but only held as long as it takes to actually do the reading for that select. Just do a commit after your inserts/updates/deletes, and you should be fine. > Since the documentation about what the DAL uses/needs/assumes about > the underlying Python layer (pysqlite in this case) isn't there, its > just easier to avoid using it outside of a Web2py application. > Seems rather extreme. What information do you need that would impact your usage? Note, the good thing about open source is that you can just look at the source code: - web2py uses the Python standard library sqlite3 module, unless you have pysqlite2 installed (this is also mentioned in the DAL chapter of the book): http://code.google.com/p/web2py/source/browse/gluon/dal.py#236 - web2py connects by creating a sqlite3.Connection object, and passes no arguments other than the database path (though, you may optionally pass arguments via the driver_args argument): http://code.google.com/p/web2py/source/browse/gluon/dal.py#1843 Other than that, the relevant documentation regarding how the driver works is here: http://docs.python.org/library/sqlite3.html. Anthony --