Hey all,
  can 'pragma integrity_check' ever modify the file? For instance in case
of a journal file laying around (which was journal file of the same schema
db but a bit different data)?

The following is what I think happened:

a.db and b.db are two sqlite dbs of size ~5mb which have same schema and
little difference in data.
the process writing to a.db is terminated or power loss or something so
a-journal.db left behind.
>> ls
a.db
a-journal.db
b.db
>> sqlite3 b.db 'pragma integrity_check'    # b.db is healthy
ok
>> rm a.db
>> mv b.db a.db                                      # rename b.db as a.db
>> sqlite3 a.db 'pragma integrity_check'   # this is I think when integrity
check modifies a.db and corrupts it
failure....
>> ls
a.db
>> sqlite3 a.db 'pragma integrity_check'
failure...


a.db is corrupted

Is this possible? If so how do we delete all temp files like -journal file?
Thanks in advance
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to