On Wed, 15 Feb 2017, Simon Slavin wrote:


On 14 Feb 2017, at 11:51pm, Bob Friesenhahn <bfrie...@simple.dallas.tx.us> 
wrote:

One of our Linux programs (not written by me) is reporting errors of the form 
"SQLITE_CORRUPT: database disk image is malformed database corruption".

Is the database actually corrupt ? Even if your other threads are not reporting this corruption, it may be real until you’ve checked. Can you use the shell tool to execute

I don't know if it is corrupt. I added query code to the program which reports the problem, causes a core dump, and then the whole device reboots. Queries written by someone else just prints a message and carries on. We use a design in that the working database is in a RAM disk and so after the device reboots, the problem database is gone.

Sometimes sqlite3_step() reports the problem and sometimes sqlite3_finalize() reports the problem.

PRAGMA integrity_check

on it and find out ?

I may be able to add code which automatically does this.

It is noteworthy that none of the other programs are encountering this problem, yet all of those programs perform SQL queries from just one thread. Some developers did try to do queries from multiple threads and encountered severe problems and so they changed their design to use just one thread.

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to