On 02/07/2012 03:00 PM, Richard Hipp wrote:
On Tue, Feb 7, 2012 at 5:19 PM, David Barrett<dbarr...@expensify.com>wrote:
2) However, we get erratic behavior when using the sqlite3 command-line
tool to just do a basic select on the database: sometimes it works,
sometimes it returns "Error: database disk image malformed". Sometimes we
just run the same command many times until it works.
As the very first thing you do in the command-line tool, enter this command:
.log stdout
That will cause additional error diagnostics to appear on standard output.
Then do your commands that provoke the malformed error, and let us know
what you see as output.
Great idea. Here's the output:
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .log stdout
sqlite> select count(*) from **redacted**;
(11) database corruption at line 45894 of [42537b6056]
(11) database corruption at line 45932 of [42537b6056]
(11) statement aborts at 16: [select count(*) from **redacted**;]
database disk image is malformed
Error: database disk image is malformed
sqlite>
It happens very erratically, and each time we've run "PRAGMA
integrity_check;" after seeing the problem (which requires several hours
of downtime for that server, so I didn't do it for the above query), it
comes up clean every single time.
Thanks for your help!
-david
PS: I apologize for redacting the query -- let me know if that would be
particularly helpful, otherwise I'd like to keep it private.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users