Small. Fast. Reliable.
Choose any three.
*** 50,52 ****
--- 50,81 ----
  {link: /capi3ref.html#sqlite3_open sqlite3_open()} calls).
  As far as I know, the only time you can get an SQLITE_LOCKED error
  in the latest code is according to the first bullet above.
+ 
+ 4: I found out that you can get the SQLITE_LOCKED error when trying a COMMIT after a change, when another connection has a SELECT open.
+ Example:
+ 
+ Prepare some table, e.g.
+ 
+   create table t(x integer);
+   insert into t values(1);
+   insert into t values(2);
+ 
+ now use 2 connections:
+ 
+   Connection 1: begin transaction;
+   Connection 2: begin transaction;
+   Connection 1: select * from t;
+   Connection 2: select * from t;
+   Connection 1: delete from t where x = 1;
+   Connection 1: commit;
+ 
+ now we see 'database is locked'!
+ 
+ Only after giving another 'Commit' or 'Rollback' on connection 2, the 'Commit' of connection 1 can be successfully repeated, e.g.
+ 
+   Connection 2: commit;
+   Connection 1: commit;
+ 
+ This is a bit unusual, as most other DB systems have no problem running a read-only query on committed values while other transactions are active.
+ 
+ And as one can see, in contrary to what others have writter earlier on this page, it is not necessary to two incompatible things within the same database connections. This works with two independant connections. It plays no role whether these connections belong to the same process or two different processes.