Re: [sqlite] Cannot write to db if it is already open for reading with shared cache

2014-08-05 Thread Кривопалов Юрий
>  Why are you using shared cache? >>  I have been working on a large enterprise application and when someone >> enabled shared cache globally, investigation for READONLY error in my code >> took a lot of time. I don't, but someone in another independent module do. I already fixed problem by u

Re: [sqlite] Cannot write to db if it is already open for reading with shared cache

2014-08-04 Thread Richard Hipp
On Mon, Aug 4, 2014 at 4:08 PM, Кривопалов Юрий wrote: > Hello. > I getinng an error in a following scenario. I think such a behaviour is > not obvoius. > 1. Enable shared cache > 2. Open db with SQLITE_OPEN_READONLY > 3. Open same db again with SQLITE_OPEN_READWRITE > 3.1 Try to insert for last

[sqlite] Cannot write to db if it is already open for reading with shared cache

2014-08-04 Thread Кривопалов Юрий
Hello. I getinng an error in a following scenario. I think such a behaviour is not obvoius. 1. Enable shared cache 2. Open db with SQLITE_OPEN_READONLY 3. Open same db again with SQLITE_OPEN_READWRITE 3.1 Try to insert for last connection. = You get SQLITE_READONLY error. If swap 2 and 3 steps, wh