>        1. When is it acceptable for sqlite to leave a corrupt database that 
> can't be used?

It's never acceptable. SQLite specifically written and tested to
manager "out of disk space" errors appropriately without database
corruption.

>        I've got the data moved off to the side after it broke.

Did you move journal along with database? If not you made a big
mistake. If it's not deleted yet and you didn't change anything in the
database you can close all connections to it, put journal nearby and
run command line utility again. After that integrity check should be
okay.

>        2. Is there any way to recover the data that didn't get corrupt (which 
> should be lots)?

If there's no way to restore journal then you can only try .dump
command from command line utility.


Pavel

On Fri, Nov 19, 2010 at 3:12 PM, Dustin Sallings <dus...@spy.net> wrote:
>
>        I have an application that was writing to a sqlite db until we ran out 
> of disk space.  The app failed to store data, commit, etc... and then was 
> killed.
>
>        I've got the data moved off to the side after it broke.  integrity 
> check says this:
>
> *** in database main ***
> Main freelist: 231854296 of 5 pages missing from overflow list starting at 
> 7184967
> On tree page 187114 cell 0: 4 of 5 pages missing from overflow list starting 
> at 5920373
> Page 5510841 is never used
> Page 5985431 is never used
> Page 6127423 is never used
> Page 6324952 is never used
> Page 7156369 is never used
> Page 7179495 is never used
> Page 7184966 is never used
> Page 7184968 is never used
>
>
>        -- clearly, overflow broke a bit.  I can do a count(*) on the table, 
> but I can't grab all of the rows due to overflow.
>
>        It seems a bit... delicate at this point, which leads to two questions:
>
>        1. When is it acceptable for sqlite to leave a corrupt database that 
> can't be used?
>        2. Is there any way to recover the data that didn't get corrupt (which 
> should be lots)?
>
> --
> Dustin Sallings
>
> _______________________________________________
> 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

Reply via email to