SQLite Forum

Deleted rows not in FreeList
Login
Sure,

So my goal is to recover deleted rows from SQLite DB's that a particular application generates.

Some python code I've found on github: https://github.com/aramosf/recoversqlite has been useful as a ready made solution to do this.

That repo has a example DB with it in dumplite/personas.sqlite that has page(s) which are marked as in the freelist (ie the deleted rows).
If on that DB I run say:
DELETE FROM personas where nick = 'bruce';

then when rerunning that recoversqlite program I can see the DB's headers have an incremented version.
Obviously SELECT * FROM personas; hasn't the record anymore.

BUT - I'd have expected a deleted row to then also be in the freelist page(s) but it isn't?

If I create a new DB from scratch, insert some rows and then delete a subset - again freelist is empty.

pragma auto_vacuum is none, the default but I've also explicitly set it off as well. 
And when deleting rows I've confirmed that file size doesn't change so don't think its vacuuming.

So bit perplexed, all I really want is the ability to create some synthetic data where there is some deleted 'stuff' in the freelist pages that is available for my own code to test its recovery against.