Re: [sqlite] Tracking error 11 : database disk image is malformed.

2012-02-03 Thread Korey Calmettes
Thanks everyone, helpful as always.  I have tabled this issue for awhile and 
put in some tracking code where running integrity_check often and logging the 
results while we continue testing other features.  If a problem is detected, 
the database is then uploaded to a server for investigation.

Some background:  This is an embedded Linux device running an ARM9 and flash 
memory.  No changes have been made to the kernel or the JFFS filesystem.  
SQLite has been running on this same device for years without any problems 
(version 3.3.13).  In fact, we have been extremely happy with the reliability 
of the product.  So I am ruling out filesystem drivers or the OS.  Since this 
has only happened one time (that I know of) and only on one device, I suppose 
some sort of power anomaly may have caused some miswriting on flash.  Not quite 
sure.  I didn't check the logs (and they are now long gone) to see if JFFS 
encountered any failures.

If I figure out what is happening and it's related to SQLite, then I will let 
everyone know.

Thanks for the assistance,

Korey

On Feb 2, 2012, at 11:38 AM, Roger Binns wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 02/02/12 10:59, Korey Calmettes wrote:
>> If I do happen to recreate the problem, is there a way to track the
>> location in the file that the corruption begins and how long the
>> corruption is?
> 
> Recreating the problem is the hard part since something isn't working the
> way it should.  You can make very frequent copies of the database plus
> frequent runs of pragma integrity check.  If it is a bug in SQLite
> (extremely unlikely) then the corruption should be deterministic so the
> information needed is how to reproduce.
> 
> If it is an issue with other code corrupting memory then using valgrind is
> a good idea.
> 
> If it is an OS/hard drive kind of issue then the corruption will be more
> random each time due to other system activity.  In this case there is
> nothing SQLite can do.
> 
> You may want to read this page covering the SQLite file format which will
> give you a better idea of how things are laid out:
> 
>  http://www.sqlite.org/fileformat2.html
> 
> Roger
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
> 
> iEYEARECAAYFAk8q5jMACgkQmOOfHg372QS1OACglvP9r9q/b9dSt0L0GSz5UbzB
> vvkAn0gwNsqjATtALH0zaOFKnxjH0SqB
> =5IfV
> -END PGP SIGNATURE-
> ___
> 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


Re: [sqlite] Tracking error 11 : database disk image is malformed.

2012-02-02 Thread Korey Calmettes
Roger,

Thanks for your response.  I have been working on that list now for a couple 
days.  I was hoping for some further insight.

If I do happen to recreate the problem, is there a way to track the location in 
the file that the corruption begins and how long the corruption is?  My hope 
has been to duplicate the problem and examine the file to see if I can see a 
pattern. (And hopefully find a cause.)

Korey

On Feb 1, 2012, at 2:28 PM, Roger Binns wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 01/02/12 12:57, Korey Calmettes wrote:
>> What would cause rows to disappear from an index?
> 
> The answer is always the same for corruption.  One or more of the
> following happened:
> 
>  http://www.sqlite.org/howtocorrupt.html
> 
> Roger
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
> 
> iEYEARECAAYFAk8pvJsACgkQmOOfHg372QRwYACgv2kwbTvGHZPKkiB0FYiXCe0q
> DgcAniG03YCvyFOUV9flj4b7YRaHmkmK
> =YNO/
> -END PGP SIGNATURE-
> ___
> 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


[sqlite] Tracking error 11 : database disk image is malformed.

2012-02-01 Thread Korey Calmettes
Hello All,

I have been in the process of getting SQLite 3.7.7.1 working on our ARM based 
platform and using WAL on some of our database files.  Yesterday, I kept 
getting:

Error = 11 : database disk image is malformed

We have seen this issue before, but not quite like this.  We were manually 
deleting the -wal file which caused many problems as you can imagine.  After we 
fixed that, I haven't seen any other instances of this problem until yesterday.

I ran "pragma integrity_check;", here are the results.

sqlite> pragma integrity_check;
rowid 16571 missing from index SortTime
sqlite>

I performed a dump on the bad database and created a new one and the data is ok 
and I no longer get the Error 11, however I am trying to figure out the cause 
to see if there is reason for concern.  I accidentally deleted the bad database 
so I am in the process of recreating the issue if I can?

Questions that I have:

What would cause rows to disappear from an index?  The row that it's talking 
about (16571) is a row that has been in the database for some time and wasn't 
recently added.  There are also rows newer and older then it.

Could this have anything to do with WAL mode?

Is there anyway to track how this occurs?  Tests that I can perform?

Any assistance in this matter would be appreciated,

Korey
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Disk I/O Error

2011-11-01 Thread Korey Calmettes
I don't think the file is truncated.

Interesting stuff here when I run pragma integrity_check:

/data # sqlite3 test.db "pragma integrity_check;"
*** in database main ***
Page 480: unable to get the page. error code=522 
Page 481: unable to get the page. error code=522 
Page 482: unable to get the page. error code=522 
On tree page 32 cell 3: Child page depth differs 
Page 485: unable to get the page. error code=522 
On tree page 32 cell 5: Child page depth differs 
On tree page 32 cell 6: Child page depth differs 
Page 487: unable to get the page. error code=522 
On tree page 32 cell 7: Child page depth differs 
On tree page 32 cell 8: Child page depth differs 
Page 493: unable to get the page. error code=522 
On tree page 32 cell 13: Child page depth differs 
On tree page 32 cell 14: Child page depth differs 
Page 495: unable to get the page. error code=522 
On tree page 32 cell 15: Child page depth differs 
On tree page 32 cell 16: Child page depth differs 
Page 505: unable to get the page. error code=522 
On tree page 45 cell 4: Child page depth differs 
On tree page 45 cell 5: Child page depth differs 
Page 421: unable to get the page. error code=522 
On tree page 15 cell 1: Child page depth differs 
Page 422: unable to get the page. error code=522 
On tree page 15 cell 3: Child page depth differs 
Page 424: unable to get the page. error code=522 
On tree page 15 cell 4: Child page depth differs 
On tree page 15 cell 5: Child page depth differs 
Page 49: unable to get the page. error code=522 
Page 33: unable to get the page. error code=522 
Page 34: unable to get the page. error code=522 
Page 472: unable to get the page. error code=522 
Page 473: unable to get the page. error code=522 
Page 474: unable to get the page. error code=522 
Page 475: unable to get the page. error code=522 
Page 476: unable to get the page. error code=522 
Page 477: unable to get the page. error code=522 
Page 478: unable to get the page. error code=522 
Page 479: unable to get the page. error code=522
Error: disk I/O error

Also, the page size is 1024.

Korey

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp
Sent: October 31, 2011 2:32 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Disk I/O Error

On Mon, Oct 31, 2011 at 5:01 PM, Korey Calmettes
wrote:

> Hello,
>
> We are having a random problem with our system that has be puzzled at 
> this point.
>
> First a little background.  We have an embedded system running an ARM 
> processor and JFFS file system.  We are running 3.7.7.1.  I e-mailed 
> about a month ago about enabling WAL on our system.  Found out that I 
> needed to set SQLITE_SHM_DIRECTORY to our tmpfs file system when 
> compiling as JFFS doesn't support shared mmap files.
>
> This has been working fine, however throughout our testing, we have 
> been hitting a problem.  It seems that some tables are no longer 
> accessible giving a Disk I/O Error.  I logged into the command line 
> interface and replicated the problem.  I ran ".log stdout" and here
are the results.
>
> sqlite> select password from auth;
> (522) statement aborts at 7: [select password from auth;]
> Error: disk I/O error
>
> However access to other tables will work without any problems.
>

Error code 522 is SQLITE_IOERR_SHORT_READ.  It is generated here:

 http://www.sqlite.org/src/artifact/07acbb3e074e?ln=3012

SQLite was trying to read N bytes and got back M byes where M>0 and M
> I searched for how to read the log without success.  I am hopeful that

> someone would be able to tell me what's going on.
>
> Korey
> ___
> 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


Re: [sqlite] Disk I/O Error

2011-11-01 Thread Korey Calmettes
If it helps the discussion any, we are using JFFS file system on Linux
2.6.8.1.

We are running uclibc, not sure if that matters or not.

And one more thing, we updated from an old version of SQLite that has
been in our product (and stable) for years. (I want to say it was
3.3.something.)  We didn't have any problems until updating to the
latest version and enabling WAL mode.

I hope that this helps,

Thanks,

Korey 

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Stephan Beal
Sent: November 1, 2011 7:46 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Disk I/O Error

On Mon, Oct 31, 2011 at 10:44 PM, Richard Hipp  wrote:

> If an interrupt occurs that stops the read before it can complete, 
> then the read should be tried again.
> http://www.sqlite.org/src/artifact/07acbb3e074e?ln=2968


This topic came up before a few months ago and someone (don't remember
who) pointed out that platforms exist which can return >0 from read()
when interrupted. My man page says:

POSIX allows a read() that is interrupted after reading some data to
return
-1 (with errno set to EINTR) or to return the number of bytes already
read.


--
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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


Re: [sqlite] Disk I/O Error

2011-11-01 Thread Korey Calmettes
When we are able to reproduce the problem again, I will run these
checks.  It's fairly random however consistent.  I will e-mail the
results to you later today.

Thanks,

Korey 

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp
Sent: October 31, 2011 2:32 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Disk I/O Error

On Mon, Oct 31, 2011 at 5:01 PM, Korey Calmettes
wrote:

> Hello,
>
> We are having a random problem with our system that has be puzzled at 
> this point.
>
> First a little background.  We have an embedded system running an ARM 
> processor and JFFS file system.  We are running 3.7.7.1.  I e-mailed 
> about a month ago about enabling WAL on our system.  Found out that I 
> needed to set SQLITE_SHM_DIRECTORY to our tmpfs file system when 
> compiling as JFFS doesn't support shared mmap files.
>
> This has been working fine, however throughout our testing, we have 
> been hitting a problem.  It seems that some tables are no longer 
> accessible giving a Disk I/O Error.  I logged into the command line 
> interface and replicated the problem.  I ran ".log stdout" and here
are the results.
>
> sqlite> select password from auth;
> (522) statement aborts at 7: [select password from auth;]
> Error: disk I/O error
>
> However access to other tables will work without any problems.
>

Error code 522 is SQLITE_IOERR_SHORT_READ.  It is generated here:

 http://www.sqlite.org/src/artifact/07acbb3e074e?ln=3012

SQLite was trying to read N bytes and got back M byes where M>0 and M
> I searched for how to read the log without success.  I am hopeful that

> someone would be able to tell me what's going on.
>
> Korey
> ___
> 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


[sqlite] Disk I/O Error

2011-10-31 Thread Korey Calmettes
Hello,
 
We are having a random problem with our system that has be puzzled at
this point.
 
First a little background.  We have an embedded system running an ARM
processor and JFFS file system.  We are running 3.7.7.1.  I e-mailed
about a month ago about enabling WAL on our system.  Found out that I
needed to set SQLITE_SHM_DIRECTORY to our tmpfs file system when
compiling as JFFS doesn't support shared mmap files.
 
This has been working fine, however throughout our testing, we have been
hitting a problem.  It seems that some tables are no longer accessible
giving a Disk I/O Error.  I logged into the command line interface and
replicated the problem.  I ran ".log stdout" and here are the results.
 
sqlite> select password from auth;
(522) statement aborts at 7: [select password from auth;]
Error: disk I/O error

However access to other tables will work without any problems.
 
I searched for how to read the log without success.  I am hopeful that
someone would be able to tell me what's going on.
 
Korey
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with using WAL journal mode in embedded system (disk I/O error)

2011-09-28 Thread Korey Calmettes
Richard,

That is my conclusion as well.  From what I have read online, JFFS
doesn't support mmap.  Would it be possible to place those files in
tmpfs instead?  Is there logic to do that?

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:55 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:48 PM, Korey Calmettes
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
> 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
> > 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


Re: [sqlite] Problem with using WAL journal mode in embedded system (disk I/O error)

2011-09-26 Thread Korey Calmettes
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?

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


Re: [sqlite] Problem with using WAL journal mode in embedded system (disk I/O error)

2011-09-26 Thread Korey Calmettes
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) -
(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
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


[sqlite] Problem with using WAL journal mode in embedded system (disk I/O error)

2011-09-26 Thread Korey Calmettes
Hi All,
 
We have been upgrading our embedded Linux system to version 3.7.7.1 of
SQLite.  We had hopes of using WAL mode to cure some of the database
locking issues that we have had.
 
Not sure if it matters but we are running an ARM9 with JFFS2 file
system.  We are using a very old kernel 2.6.8.1, I'm not sure that has
anything to do with it or not.
 
The following test on the embedded platform illustrates what we are
seeing.  test.db doesn't exist prior to running this test.
 
~ # 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> create table test (test integer);
sqlite> .tables
test
sqlite> .exit
~ # 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>

 
When a database is in journal_mode=wal, it always returns disk I/O
error.  When I look at the files, there are three files for this
database.  test.db, test.db-shm, and test.db-wal.
 
Any ideas on what may be causing this error and any suggestions for a
work-around?
 
Korey
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite on ARM9 running Linux

2007-03-02 Thread Korey Calmettes

I am planning an embedded project using SQLite an a Cirrus Logic
EP9301.  I am curious of any difficulties that have been found in
either compiling and/or using SQLite in this environment.

Thanks for any input that you can provide,

Korey

-
To unsubscribe, send email to [EMAIL PROTECTED]
-