Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Scott Hess
On Tue, Sep 15, 2009 at 8:11 PM, Tito Ciuro wrote: > On Sep 15, 2009, at 8:04 PM, Scott Hess wrote: >> Do you have any reason to believe that your database had exactly a >> single corruption? > > What do you mean by 'single corruption'? This particular database is > prone to index

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Simon Slavin
On 16 Sep 2009, at 4:11am, Tito Ciuro wrote: > What do you mean by 'single corruption'? This particular database is > prone to index corruption. So use the sqlite3 command-line tool to dump it to a text file, then read it back in again. See if the new database is prone to corruption too.

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Scott Hess
On Tue, Sep 15, 2009 at 7:04 PM, Tito Ciuro wrote: > On Sep 15, 2009, at 6:59 PM, P Kishor wrote: > >> On Tue, Sep 15, 2009 at 8:50 PM, Tito Ciuro wrote: >>> On Sep 15, 2009, at 6:42 PM, P Kishor wrote: >>> Could it be that those seemingly identical multiple

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
On Sep 15, 2009, at 6:59 PM, P Kishor wrote: > On Tue, Sep 15, 2009 at 8:50 PM, Tito Ciuro wrote: >> On Sep 15, 2009, at 6:42 PM, P Kishor wrote: >> >>> Could it be that those seemingly identical multiple rows actually >>> have >>> trailing spaces or some other non-visible

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread P Kishor
On Tue, Sep 15, 2009 at 8:50 PM, Tito Ciuro wrote: > On Sep 15, 2009, at 6:42 PM, P Kishor wrote: > >> Could it be that those seemingly identical multiple rows actually have >> trailing spaces or some other non-visible character? Check for their >> length. > > Here we go: > >>

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
On Sep 15, 2009, at 6:42 PM, P Kishor wrote: > Could it be that those seemingly identical multiple rows actually have > trailing spaces or some other non-visible character? Check for their > length. Here we go: > sqlite> SELECT clientName, entityName, length(entityName) FROM > MyDBState ORDER

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread P Kishor
On Tue, Sep 15, 2009 at 8:34 PM, Tito Ciuro wrote: > Hello, > On Sep 15, 2009, at 6:15 PM, P Kishor wrote: > > well, your clientName, entityName combo is not unique in the list > above, and it should be given it is a PK. I have no idea how you > managed to insert these rows while

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
Hello, On Sep 15, 2009, at 6:15 PM, P Kishor wrote: > well, your clientName, entityName combo is not unique in the list > above, and it should be given it is a PK. I have no idea how you > managed to insert these rows while the PK constraint was active. Precisely. I cannot reproduce this

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Simon Slavin
On 16 Sep 2009, at 2:15am, P Kishor wrote: > well, your clientName, entityName combo is not unique in the list > above, and it should be given it is a PK. I have no idea how you > managed to insert these rows while the PK constraint was active. What happens in SQLite if you load the data first,

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread P Kishor
On Tue, Sep 15, 2009 at 4:22 PM, Tito Ciuro wrote: > Hello, > > On Sep 15, 2009, at 12:55 PM, D. Richard Hipp wrote: > >> >> On Sep 15, 2009, at 3:33 PM, Tito Ciuro wrote: >> >>> Hello, >>> >>> Given the following pragma integrity_check output: >>> sqlite> pragma

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
Hello, On Sep 15, 2009, at 12:55 PM, D. Richard Hipp wrote: > > On Sep 15, 2009, at 3:33 PM, Tito Ciuro wrote: > >> Hello, >> >> Given the following pragma integrity_check output: >> >>> sqlite> pragma integrity_check; >>> rowid 106931 missing from index sqlite_autoindex_MyDBState_1 >>> rowid

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread D. Richard Hipp
On Sep 15, 2009, at 3:33 PM, Tito Ciuro wrote: > Hello, > > Given the following pragma integrity_check output: > >> sqlite> pragma integrity_check; >> rowid 106931 missing from index sqlite_autoindex_MyDBState_1 >> rowid 106933 missing from index sqlite_autoindex_MyDBState_1 >> rowid 106935

[sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
Hello, Given the following pragma integrity_check output: > sqlite> pragma integrity_check; > rowid 106931 missing from index sqlite_autoindex_MyDBState_1 > rowid 106933 missing from index sqlite_autoindex_MyDBState_1 > rowid 106935 missing from index sqlite_autoindex_MyDBState_1 > wrong # of