I have implemented diagnostic routines which allow my users to check the database for problems. If something bad happens to a database (which may be not the fault of SQLite at all, e.g. a network problem or disk problem) I want to detect this as early as possible in order to inform the user. This allows them to restore their backups before too much data is lost.
The first phase in my analysis checks the data in the database for logical problems, business logic issues etc. After this phase has been completed, my diagnosis function runs: 1. PRAGMA integrity_check(100) 2. VACUUM 3. ANALYZE My idea was that these routines should reveal problems reading from or writing to the database file. Today I had a case where my diagnosis considered a database as OK (all SQLite functions used in the diagnosis returned SQLITE_OK), but the database still runs into the dreaded "disk image malformed" problem shortly afterwards :-( My question: Is there a API function etc. which performs a reliable test of all database pages and other structures? Something that will detect that "disk image malformed" will be returned when some areas of the database are updated? _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users