On Mon, Aug 4, 2014 at 4:08 PM, Кривопалов Юрий <[email protected]>
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 connection.
> = You get SQLITE_READONLY error.
> If swap 2 and 3 steps, when all works without errors.
>

"Shared cache" means that two or more database connections are sharing the
same file descriptor to the database file.  All database connections use
which ever one opened first.  If you open the readonly connection first,
then all other connections sharing that same cache will also be read-only.

Why are you using shared cache?


-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to