> If opening a DB read-only implies that the physical file is always opened 
> read-only, then I understand.  But, if read-only is just something for SQLite 
> to know that it can't modify the database, rollback would still be possible.

You are right that opening database with SQLITE_OPEN_READONLY means
only that SQLite cannot modify database and rollback is still
possible. But that doesn't mean that OS will allow your process to do
the rollback. File and/or directory permissions can prohibit that and
that's what Richard is talking about.


Pavel


On Fri, Feb 17, 2012 at 4:15 PM, Marc L. Allen
<mlal...@outsitenetworks.com> wrote:
>> > This means that before any application can be permitted to access
>> (e.g.
>> > open) the database, that database should be made consistent.  Then,
>> > and only then, should the application be able to open it.  In another
>> > words, when I go to open a database, if the engine cannot provide me
>> a
>> > consistent database for my connection, I should be informed of that.
>> > Not later when I try to do something.
>> >
>>
>> The database might well be consistent when you open it, but then some
>> external process outside of your control makes it inconsistent after
>> you open it.  Normally when this happens, your process will
>> automatically recover the database before proceeding and your
>> application will be none the wiser.  But if your application lacks
>> sufficient privileges to recover the database, then you are stuck.
>
> If opening a DB read-only implies that the physical file is always opened 
> read-only, then I understand.  But, if read-only is just something for SQLite 
> to know that it can't modify the database, rollback would still be possible.
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to