Commit Graph

19 Commits

Author SHA1 Message Date
dan
1b3d13e65e Add the SQLITE_FCNTL_RESET_CACHE verb. Use it to ensure that the page cache is purged before and after a the recovery extension is run.
FossilOrigin-Name: 6db0bc4bc0d272b610bef2aeeae43f539ed6e7cc0a9cc767d5af85ecb0019d5f
2022-11-28 18:41:41 +00:00
dan
a16edfa29b Tweaks to recover module test scripts to work with various permutations.
FossilOrigin-Name: 454c61e818f6941c9a23f6600e37828a3f2b2ad3c6dbc8d6223570aed5d9cd8b
2022-11-04 18:32:45 +00:00
dan
ffc9b1b046 Fix Tcl tests so that they again build and run with SQLITE_OMIT_VIRTUALTABLE defined.
FossilOrigin-Name: 06a9dbea40c8a0cdfae6b127a1ce1cba0547acdf1115c087e9b790a78c264b52
2022-11-04 15:17:14 +00:00
dan
549907fd67 Avoid a segfault that could occur when running the recover API on a database handle with memory-mapping enabled.
FossilOrigin-Name: e02c697281a777c33070168af784b2d291397e488244a217620897f40aed7158
2022-10-31 10:53:23 +00:00
dan
48a4a4b73d Fix a problem with running ".recover" on an in-memory database.
FossilOrigin-Name: 87b4cca2b84845cee603d40fbf16c9635d6dc2d19d2f37ae86abfeff716c9a85
2022-10-27 11:12:54 +00:00
dan
3fa10f82f4 Handle recovering databases with reserved bytes at the end of each page.
FossilOrigin-Name: 52d0235ef3f21683daadf2343514f7b95a67c3589266f75c1e00e04f11dc6214
2022-10-14 15:46:19 +00:00
dan
88a0637f57 Ensure the page-size, auto-vacuum and other settings are copied into the recovered database.
FossilOrigin-Name: 078520f2825bcb82d01b30209409e9bf8b6c99084c192345df41c9f531d08f51
2022-10-06 21:00:23 +00:00
dan
4df12ce5a8 Add code to determine the database page-size by searching for well-formed pages.
FossilOrigin-Name: 0dbd0ccef532e076fa82c9fad4dc9fe632c0ef43e3483cc288cbb7eca336a9b9
2022-10-06 17:20:12 +00:00
dan
aee4049128 Update things to use sqlite3_recover_step() internally.
FossilOrigin-Name: f4b15aad3005237b7ac507eed2b9b07e0f5c9407ab28f2656a21c9845f13d35f
2022-09-24 18:05:52 +00:00
dan
3c24342841 Extra tests and fixes.
FossilOrigin-Name: deed5336931b23bb507c064d08e9899b33f04e4f7eee03beb8d7147eb4caa030
2022-09-14 18:57:46 +00:00
dan
b8eaf9a10d Fix recovery of utf-16 databases.
FossilOrigin-Name: 5b05be0861f35804270fbd184ad4b89c23e98cc2fbd56b9e4fe6197daef5fe49
2022-09-14 16:37:59 +00:00
dan
322967df59 Add OOM tests for the recovery extension.
FossilOrigin-Name: 9b6b4c7162439a889144edb561356afc66436db921a867c20871f0c556716502
2022-09-13 20:40:57 +00:00
dan
7985e05a97 Add tests. Deal issues surrounding aborting recovery from within the SQL callback, and avoiding the pending-byte page.
FossilOrigin-Name: 4e97dd31f5240d9231167ae172a5116426c42177a1ed3c5422b9d51b762d5a87
2022-09-13 18:08:24 +00:00
dan
7920162093 Handle recovery of virtual tables by recovering each shadow table individually, then writing the CREATE VIRTUAL TABLE statement directly into the sqlite_schema table.
FossilOrigin-Name: 5f2d5ccd56c06c3468377126acfd4be39b79b05bb6fb09b674b2e185df143aa3
2022-09-09 16:25:19 +00:00
dan
9a27d65044 Update the shell to use the recover extension for the .recover command.
FossilOrigin-Name: ae832e77084eddd696c80cb926d070a5db9d45dce34156a02522b3140e8f5e8b
2022-09-08 19:22:29 +00:00
dan
3887ffe82a Fix problems with recovering the sqlite_sequence table.
FossilOrigin-Name: 356d2209ea5f6b69ce15b62027c63419c2d039e52f01c74a3810a6317abf4fb0
2022-09-08 17:42:33 +00:00
dan
d5e3fe50f8 Add a mode to output SQL statements instead of populating a database to the recover extension.
FossilOrigin-Name: 73058416e7da6581000898b7988a7010e2ce6632246f4c12b4398700c7744b83
2022-09-05 21:00:22 +00:00
dan
6c86783f9a Further work on making recovery extension compatible with the shell tool ".recover" code.
FossilOrigin-Name: 8df7c7d0dcd1b2fcdad00e765a9868407f0ced02ac4432ee2cdf25d83b130759
2022-09-01 21:00:39 +00:00
dan
73b09b87d5 Add new files for an extension to recover data from corrupted databases.
FossilOrigin-Name: f8298eeba01cb5b02ac4d642c06f3801331ca90edea533ea898a3283981a9e49
2022-08-31 20:45:43 +00:00