I have a corrupt sqlite_sequence table.  It has table names in the "seq"
field.

here is a trimmed version of data in sqlite_sequence:


-- Loading resources from C:\Documents and Settings\sam/.sqliterc
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> .width 50 50
sqlite> select * from sqlite_sequence;
name                                                seq
--------------------------------------------------
--------------------------------------------------
Transactions                                        2
ActiveTransaction                                   2
AnnotationIcons_History                             21
TransactionSequences                                494
CaptureDeviceTransactions                           8
Annotations
CaptureDeviceTransactions
Annotations_History                                 24
ChecklistVersions                                   Annotations_History
ChecklistVersions_History                           4
sqlite>



basically it gets corrupt when I run a bunch of scripts that update from one
schema to a new one (usually add new columns).  The queries do a lot of

ALTER TABLE x RENAME TO y;
CREATE TABLE x (...);
INSERT INTO x SELECT ... FROM y;
DROP TABLE y;

and after that the sqlite_sequence table is messed up as shown above.  It
doesn't happen every time--in the above listed data both Annotations and
Annotations_History were updated this way, but only Annotations got messed
up.

We cache all the data in sqlite_sequence before we do our updates and our
intention is to update it afterwards (we haven't written this part yet due
to sqlite_sequence corruption, so at this point we're only reading from the
table, not updating/inserting into it).

Our app is using sqlite 3.5.9.  I'm still using sqlite3.exe 3.5.7 but I see
the same corrupted data in both.

Please help.

Thanks,

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

Reply via email to