On Tue, Sep 27, 2011 at 8:14 AM, Black, Michael (IS) <michael.bla...@ngc.com
> wrote:

>
> Richard almost got it.  According to this link JFFS doesn't support
> MMAP_SHARED.  Can another flag be used?
>

No.  The whole point of doing the mmap() is so that different processes
accessing the same database file can share some memory in order to
coordinate their activities.  MMAP_SHARED is absolutely required in this
context.

If JFFS does not support MMAP_SHARED, then it won't support WAL.

Except, if you only have a single process accessing the database file, then
you can set "PRAGMA locking_mode=EXCLUSIVE" and the shared memory will not
be used.



>
> http://lists.busybox.net/pipermail/uclibc/2006-November/016838.html
>
> Michael D. Black
> Senior Scientist
> NG Information Systems
> Advanced Analytics Directorate
>
>
>
>
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
> behalf of Richard Hipp [d...@sqlite.org]
> Sent: Monday, September 26, 2011 1:54 PM
> To: General Discussion of SQLite Database
> Subject: EXT :Re: [sqlite] Problem with using WAL journal mode in embedded
> system (disk I/O error)
>
>
> On Mon, Sep 26, 2011 at 2:48 PM, Korey Calmettes <kcalmet...@icontime.com
> >wrote:
>
> > Richard,
> >
> > Thanks for the tip of recreating the experiment in a separate directory.
> > However the same error occurs.
> >
> > sqlite> .tables
> > (5386) os_unix.c:28414: (22) mmap(/data/test.db-shm) -
> > (5386) statement aborts at 109: [SELECT name FROM sqlite_master WHERE
> > type IN ('table','view') AND name NOT LIKE 'sqlite_%' UNION ALL SELECT
> > name FROM sqlite_temp_master WHERE type IN ('table','view') ORDER BY 1]
> > disk I/O error
> > Error: disk I/O error
> > sqlite>
> >
> > Any additional ideas why mmap would be failing?
> >
> >
> Perhaps your kernel doesn't support mmap() on JFFS filesystems?  (That's
> just a guess.)
>
>
>
> >  Korey
> >
> > -----Original Message-----
> > From: sqlite-users-boun...@sqlite.org
> > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp
> > Sent: September 26, 2011 11:36 AM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] Problem with using WAL journal mode in embedded
> > system (disk I/O error)
> >
> > On Mon, Sep 26, 2011 at 2:21 PM, Korey Calmettes
> > <kcalmet...@icontime.com>wrote:
> >
> > > Thanks for responding so quickly.
> > >
> > > I performed the same general experiment.  Here is the output when the
> > > error occurred.
> > >
> > > sqlite> .tables
> > > (5386) os_unix.c:28414: (22) mmap(//test.db-shm) -
> > >
> >
> > Looks like a mmap() call is failing here:
> > http://www.sqlite.org/src/artifact/10e0c4dcdb?ln=4009-4011
> >
> > Looks like you are using a database in the root of the filesystem
> > ("/test.db").  Do you get the same error if you put the database file in
> > a directory someplace?
> >
> >
> > > (5386) statement aborts at 109: [SELECT name FROM sqlite_master WHERE
> > > type IN ('table','view') AND name NOT LIKE 'sqlite_%' UNION ALL SELECT
> >
> > > name FROM sqlite_temp_master WHERE type IN ('table','view') ORDER BY
> > > 1] disk I/O error
> > > Error: disk I/O error
> > > sqlite>
> > >
> > > Any ideas?
> > >
> > > Korey
> > >
> > >
> > > -----Original Message-----
> > > From: sqlite-users-boun...@sqlite.org
> > > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp
> > > Sent: September 26, 2011 8:38 AM
> > > To: General Discussion of SQLite Database
> > > Subject: Re: [sqlite] Problem with using WAL journal mode in embedded
> > > system (disk I/O error)
> > >
> > > On Mon, Sep 26, 2011 at 11:30 AM, Korey Calmettes
> > > <kcalmet...@icontime.com>wrote:
> > >
> > > > ~ # sqlite3 test.db
> > > > SQLite version 3.7.7.1 2011-06-28 17:39:05 Enter ".help" for
> > > > instructions Enter SQL statements terminated with a ";"
> > > > sqlite> .tables
> > > > test
> > > > sqlite> pragma journal_mode=wal;
> > > > wal
> > > > sqlite> .tables
> > > > Error: disk I/O error
> > > > sqlite>
> > > >
> > > >
> > > > Any ideas on what may be causing this error and any suggestions for
> > > > a work-around?
> > > >
> > >
> > > Type:
> > >
> > >    .log stdout
> > >
> > > at the beginning of this session and run your experiment again please.
> > > The extra output might give some clues.
> > >
> > >
> > > --
> > > 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
> > _______________________________________________
> > 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