The pragmas I am using are just journal mode WAL and the add on pragma from 
sqlcipher to set the key.  I am using threads fairly heavily (or rather C# is 
via Tasks and asynchronous ops), but here is the overall model:

Read connection (read only) shared between threads freely.  I can pump this 
through the single thread as well, but it will still suffer from an error in 
prepared statement handling (see below on write connection)
Write connection (also internal reads) pumped through a single thread for 
writes.  However, I realized that prepared statements were only being created 
on the special thread but being executed on others.

I read something that indicated that SQLite is never safe to be used from two 
threads at once, but it was labeled as outdated and seems to be contradicted by 
the newer information.

I am only using one process in the program.

Jim Borden
Software Engineer

[email protected]

On 6/30/16, 6:26 PM, "[email protected] on behalf of 
Simon Slavin" <[email protected] on behalf of 
[email protected]> wrote:

>
>On 30 Jun 2016, at 3:11pm, Jim Borden <[email protected]> wrote:
>
>> There were two instances of reported corruption today
>
>Are you using any pragmas ?  Are you using threads ?  Are you using more than 
>one process in one program ?
>
>Simon.
>_______________________________________________
>sqlite-users mailing list
>[email protected]
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to