I see that my reads are blocked by writing to the database, which is in WAL mode - I'm at a dead end why.
My setup:
- SQLite3 database, journal_mode = WAL, synchronous = NORMAL
- Mulitple C ++ processes (3, to be precise) use a database. Any method inside this process opens and closes its own non-shared connection with
sqlite3_open_v2 . - Methods that insert data open db in
SQLITE_OPEN_READWRITE mode - Methods that are read from the database (i.e. only for select statements) open db in
SQLITE_OPEN_READONLY mode
In WAL mode, I believe it should be possible to have readers at the same time while there is a recording.
However, I see that the "database is locked" when I prepare the select statement using sqlite3_prepare_v2
What can I do wrong that makes the reader block? Do I really not understand what Reading is?
Any advice appreciated
thanks:)
Stretch
source share