On 23 Jun 2015, at 9:49am, Harmen de Jong - CoachR Group B.V. <harmen at coachr.com> wrote:
> Is there anyone who can confirm that the first read transaction with WAL > enabled locks the database because it triggers the SchemaLoaded? The sqlite3_open() commands do not actually open the file. They don't even make sure it exists on disk. They just make a note in memory about which file to open. The first command which actually accesses the file for reading or writing opens the file and reads the schema. It is the reading of the schema, not the transaction, which requires the locking. So modifying the transaction won't help with your problem. The problem occurs because the file is being opened. If, in your program, your 'open' command occurs a long time before your first 'read' command, then perhaps you can put a dummy 'read' command into your program so that it happens immediately after the file is opened. But I do not know if this would help in your place. I think that this confirms your question. Please don't hesitate to post more if I got it wrong or we can help. Simon.