On 25 Sep 2010, at 7:14am, Zhonghuifeng163 wrote:

> At 2010-09-25,"Simon Slavin" <[email protected]> wrote:
> 
>> On 25 Sep 2010, at 5:17am, Zhonghuifeng163 wrote:
>> 
>>> At 2010-09-25,"Simon Slavin" <[email protected]> wrote:
>>> 
>>>> On 25 Sep 2010, at 3:43am, Zhonghuifeng163 wrote:
>>>> 
>>>>> I use sqlite 3.6.20 on windows mobile system,but the sqlite often return 
>>>>> error message "The database disk image is malformed", then the sqlite 
>>>>> database file can not be used! I also use sqlite 3.6.20 on other operate 
>>>>> system on mobile phone, and do not have this problem.
>>>> 
>>>> When it does this, what does the integrity check say ?
>>> 
>>> *** in database main ***
>>> 
>>> On tree page 766 cell 64: 2nd reference to page 764
>>> 
>>> On tree page 766 cell 64: Child page depth differs
>>> 
>>> On page 12 at right child: 2nd reference to page 770
>> 
>> Stop using a corrupt database file.  Start again from one which gives no 
>> errors when you integrity check it. Check this new one frequently to see if 
>> the things you do create errors in this one too.
>> 
> I have already done this, and the error occurs again. I want to know how it 
> happened? What is the primary reason that occurs the error?

Can I ask which PRAGMAs you're using ?

Also, how many processes or threads might be using the database at once ?

On your mobile platform, is it likely that power has been removed without the 
database being closed properly (sqlite3_close()) or before the _close command 
has had a few miliseconds to do its job ?  If you have a multi-tasking 
switcher, is the database closed when your task is moved to the background ?

None of the above are definite causes of this problem, and there are 
work-arounds for each one, but if you do them frequently or in combination with 
each-other they can cause this kind of corruption.  Also, there are causes I 
didn't mention above, so do tell us anything else weird about your setup.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to