On Wed, Jun 26, 2013 at 1:24 PM, Israel Lins Albuquerque <
israelin...@yahoo.com.br> wrote:

> I open an database twice times in same process and same thread one in
> readonly mode, and the other read write.
> With shared_cache enable.
> Opening first the readonly mode and after readwrite mode, the second
> connection works as read only too.
>
> Then I looked to sqlite code and I see the problem in:
> sqlite3BtreeOpen line 1788, because the shared cache uses the same
> structure in booth connections, and pBt->pPager->readOnly is set to 1.
>
> To workaround this I will open read write mode first, but that make
> readonly connection become read write.
>
> There is an know issue?
>

Yes.  That is the way shared cache mode works.  The read-only attribute is
set or cleared by the first connection to open the database file.  The
read-only attribute is ignored for all subsequent opens.


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to