Re: [sqlite] Data loss after vacuum

2009-11-02 Thread Simon Slavin
On 2 Nov 2009, at 6:39pm, chen jia wrote: > Thanks for your replies, Simon and Dair. > > Yes, it is probably a bug in sqlite version 3.6.10. After I upgraded > to version 3.6.12, I ran vacuum again and had no problems. That's good news. > I do have more questions. > > I want to clean fragmenta

Re: [sqlite] Data loss after vacuum

2009-11-02 Thread chen jia
Thanks for your replies, Simon and Dair. Yes, it is probably a bug in sqlite version 3.6.10. After I upgraded to version 3.6.12, I ran vacuum again and had no problems. I do have more questions. I want to clean fragmentation in the database with vacuum command. When I ran a combination of '.du

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread Dair Grant
chen jia wrote: > Before I ran vacuum, I ran pragma integrity_check; and got > sqlite> pragma integrity_check; > ok > > After I ran vacuum, I ran pragma integrity_check; again and got > sqlite> pragma integrity_check; > *** in database main *** > On tree page 15 cell 36: Child page depth differs

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread Simon Slavin
On 31 Oct 2009, at 9:39pm, chen jia wrote: > I have not updated sqlite from version 3.6.10 to version 3.6.12 yet. 3.6.10 was January 2009. 9 months ago. Perhaps there's an easy way to get a later version. > But, I have tried .dump by following the instructions on >

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread chen jia
> Although the first integrity_check says that there are no errors, it > may be wrong. I am not able to definitely tell what is wrong, so I am > just guessing. Your earlier post said you were running version > 3.6.10. Please try to update to the latest version of SQLite > available for your plat

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread Simon Slavin
On 31 Oct 2009, at 7:03pm, chen jia wrote: > Before I ran vacuum, I ran pragma integrity_check; and got > sqlite> pragma integrity_check; > ok > > After I ran vacuum, I ran pragma integrity_check; again and got > sqlite> pragma integrity_check; > *** in database main *** > On tree page 15 cell 36

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread chen jia
> Please enter this line in the same sqlite3 tool you are using for > vacuum: > PRAGMA integrity_check; > It appears that you have a copy of the database from before the > 'vacuum' command. If you can, take another copy and run the PRAGMA > command both before and after the 'vacuum'. For more d

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread chen jia
> Please enter this line in the same sqlite3 tool you are using for > vacuum: > PRAGMA integrity_check; > It appears that you have a copy of the database from before the > 'vacuum' command. If you can, take another copy and run the PRAGMA > command both before and after the 'vacuum'. For more d

Re: [sqlite] Data loss after vacuum

2009-10-30 Thread Simon Slavin
On 31 Oct 2009, at 3:22am, chen jia wrote: > Before I ran vacuum, this table, firmsret11, has 2338120 rows. > > After I ran vacuum as follows, > $ sqlite3 hq.db > SQLite version 3.6.10 > Enter ".help" for instructions > Enter SQL statements terminated with a ";" > sqlite> vacuum; > sqlite> .exit

[sqlite] Data loss after vacuum

2009-10-30 Thread chen jia
Hi there, I experienced data loss in one my tables after I execute vacuum command from sqlite3. Before I ran vacuum, this table, firmsret11, has 2338120 rows. After I ran vacuum as follows, $ sqlite3 hq.db SQLite version 3.6.10 Enter ".help" for instructions Enter SQL statements terminated with