Re: [sqlite] Auto index with wrong number of entries

2011-06-29 Thread Adam DeVita
Good idea.

The result was : ok

Of note, we found in our dump and import duplicate 4 entries that violated
uniqueness of the primary key. (2 entries of 4 different primary keys, with
only 1 other field having a different int.) We identified which one belongs
and commented out the others.  How did this happen for this workstation? I'm
not sure if we will ever know, given that the offending records are create
date 2 years ago, modified 1 year ago.


Command prompt reports version 3.6.10 on start up.

Adam
On Wed, Jun 29, 2011 at 9:08 AM, Simon Slavin  wrote:

>
> On 29 Jun 2011, at 2:04pm, Adam DeVita wrote:
>
> > On Tue, Jun 28, 2011 at 11:34 AM, Simon Slavin 
> wrote:
> >
> >> Use the sqlite3 command-line shell to dump the database to SQL commands,
> >> then create a new database by reading it back in.
> >>
> >> While the data is in the SQL command file, you can take a look and make
> >> sure those records are present.
> >
> > Success!
>
> Great.  You might want to run integrity_check on the result just for the
> very unlikely possibility that you have discovered a bug in SQLite and the
> resulting database has the same problem.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Auto index with wrong number of entries

2011-06-29 Thread Simon Slavin

On 29 Jun 2011, at 2:04pm, Adam DeVita wrote:

> On Tue, Jun 28, 2011 at 11:34 AM, Simon Slavin  wrote:
> 
>> Use the sqlite3 command-line shell to dump the database to SQL commands,
>> then create a new database by reading it back in.
>> 
>> While the data is in the SQL command file, you can take a look and make
>> sure those records are present.
> 
> Success!

Great.  You might want to run integrity_check on the result just for the very 
unlikely possibility that you have discovered a bug in SQLite and the resulting 
database has the same problem.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Auto index with wrong number of entries

2011-06-29 Thread Adam DeVita
Success!



On Tue, Jun 28, 2011 at 11:34 AM, Simon Slavin  wrote:

>
> On 28 Jun 2011, at 4:22pm, Adam DeVita wrote:
>
> > I can see the data that I want to export.   How do I fix these indexes?
>
> Use the sqlite3 command-line shell to dump the database to SQL commands,
> then create a new database by reading it back in.
>
> While the data is in the SQL command file, you can take a look and make
> sure those records are present.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Auto index with wrong number of entries

2011-06-28 Thread Simon Slavin

On 28 Jun 2011, at 4:22pm, Adam DeVita wrote:

> I can see the data that I want to export.   How do I fix these indexes?

Use the sqlite3 command-line shell to dump the database to SQL commands, then 
create a new database by reading it back in.

While the data is in the SQL command file, you can take a look and make sure 
those records are present.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Auto index with wrong number of entries

2011-06-28 Thread Adam DeVita
Good day,

Following a data collection & reporting error from a workstation, I have
found that

pragma integrity_check


reported that 2 of my tables have a few thousand entries missing in their
auto indexes.
wrong number of entries in index sqlite_auto_index_tablename_1
rowid 87973 missing from ... table above.


I can see the data that I want to export.   How do I fix these indexes?

regards,
Adam DeVita
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users