On 5/13/05, Brandon, Nicholas <[EMAIL PROTECTED]> wrote: > > I think I might be getting confused on this subject as well. Does this mean > that SQLite 3.x can NOT process multiple inserts/updates within one > transaction if it is working on the same table?
No, that seems to work fine. I guess the table is locked for a specific transaction, so you cannot have any problems with a lock held by the very same transaction. > ie Below would return "database table is locked"? > > BEGIN TRANSACTION > SELECT * from table1 WHERE col > x > UPDATE table1 SET col = ... > INSERT INTO table1 .... > COMMIT TRANSACTION Just try it with the command line tool sqlite3. Works fine here. You can even read the stable from a parallel transaction, but you cannot write it. With a more fine grain locking, you could possibly support parallel writes, too, but in most cases it will be easier just to retry one of the transactions. Thomas