On 26 Feb 2012, at 7:29pm, Patrik Nilsson <nipatriknils...@gmail.com> wrote:

> I have a table called page (defined below) and have noticed that the
> data-variable (blob) sometimes get corrupted. How do I set up a log to
> debug what is happening. What I want is a log file saved with my file,
> so I can backtrace the error.

There are various callbacks you can use to make SQLite call your own logging 
routines, but I don't think anything will help with this sort of thing.

> This is also to be able to send in a good bug report to the developers
> of SQLite.
> 
> I don't know the exact steps to reproduce the error, but the following
> might give someone a clue:
> 
> 1) Add rows (one by one) with data.
> 2) Update sortorder for the whole table with begin/commit

Can you explain that ?  Tables don't have a sortorder.  You would normally put 
begin/commit around commands changing the data in a table, e.g. the INSERT 
commands in your step (1).

> 3) After these and maybe some other steps (i.e. updating a row's data
> with new data), I discover that a random row of the table has a
> corrupted data-blob.

Are you using any PRAGMAs ?  Is the database file on the hard disk of the 
computer doing the operations, or are you accessing it across a network ?  Are 
you doing any kind of multi-thread/multi-process/multi-user thing ?

There are a whole bunch of things that will corrupt your file so I'll point you 
at the page, but answering the above questions will help you faster.

<http://www.sqlite.org/howtocorrupt.html>

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

Reply via email to