On Fri, Sep 28, 2012 at 9:23 AM, Sebastian Krysmanski
<maya.li...@gmail.com>wrote:

> Yes, I know that. It's just that the error code reported by
> "sqlite3_step()" is inconsistent.
>

I "bug" means that the wrong answer is computed.  I don't think getting a
slightly different error code for an illegal operation when performed on
different operating systems qualifies as a "bug".


>
> On Fri, Sep 28, 2012 at 3:21 PM, Richard Hipp <d...@sqlite.org> wrote:
>
> > On Fri, Sep 28, 2012 at 9:09 AM, Sebastian Krysmanski
> > <maya.li...@gmail.com>wrote:
> >
> > > Hi,
> > >
> > > I'm working on a C# SQLite wrapper and have created some unit tests.
> One
> > of
> > > them checks the behavior when changing the permanent journal mode of a
> > > database (from DELETE to WAL and the other way around) while the
> database
> > > is in read-only mode. Here's what I do basically:
> > >
> > > 1. Open new database in read-write mode.
> > > 2. Set "source" journal mode (WAL or DELETE)
> > > 3. Close connection
> > > 4. Open connection to this database in read-only mode
> > > 5. Try to change to the "destination" journal mode (again WAL or
> DELETE).
> > > Except this to return SQLITE_READONLY.
> > >
> > > Now, on Windows "sqlite3_step()" returns "SQLITE_READONLY" in both
> > > directions but on Linux (or on Android, to be more precise) I get
> > > "SQLITE_READONLY" when changing from DELETE to WAL but I get
> > "SQLITE_IOERR"
> > > ("disk I/O error") when changing from WAL to DELETE.
> > >
> > > I'm using SQLite 3.7.14.
> > >
> > > Is this a bug?
> > >
> >
> > The DELETE/WAL distinction is recorded in the database file itself.  So
> if
> > the database is read-only, you cannot alter the file in order to change
> it
> > between DELETE and WAL.
> >
> >
> > >
> > > Best regards
> > > Sebastian
> > > _______________________________________________
> > > sqlite-users mailing list
> > > sqlite-users@sqlite.org
> > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> > >
> >
> >
> >
> > --
> > D. Richard Hipp
> > d...@sqlite.org
> > _______________________________________________
> > 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
>



-- 
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