>In other words, if two processes write to the same sqlite file but to
>different tables, will one wait for the other? What if to the same
>table but different rows? Thanks.
You will not be permitted to do that as there is no locking at a grain finer than the entire database between processes. One of the processes will be able to obtain the update transaction lock, and the other will fail to obtain that update transaction lock. Unless you are using WAL journal mode, then in such a circumstance even the successful process may never be able to commit its changes if the other process never releases its shared lock (this is called a deadlock). That is why you must always acquire all needed locks at one go by using the appropriate type of BEGIN statement, and if your lock acquisition fails you must release all held locks.
Von: sqlite-users [mailto:[hidden email]] Im Auftrag von Peng Yu
Gesendet: Dienstag, 03. September 2019 22:14
An: SQLite mailing list <[hidden email]>
Betreff: [EXTERNAL] [sqlite] What concurrency level is of sqlite?
In other words, if two processes write to the same sqlite file but to different tables, will one wait for the other? What if to the same table but different rows? Thanks.