Closed titanism closed 2 months ago
Related to #64 - a rekey operation does not throw an error until you call vacuum, and when that occurs the database is stuck in a corrupt state.
Further attempts to open a database that "rekey" was invoked upon while in WAL mode fail, resulting in a corrupt database file that cannot be opened.
db.pragma('key="foo"'); db.pragma('rekey="baz"'); // <--- does not throw an error when already in WAL mode
The fix we found was to call vacuum after changing WAL to DELETE and before (and after) calling rekey
vacuum
I'm closing this as it's the intended behavior and advised to do so. I do feel like this should go in the SQLite3MC documentation. Feel free to open an issue about it in the SQLite3MC repo if you think so.
Related to #64 - a rekey operation does not throw an error until you call vacuum, and when that occurs the database is stuck in a corrupt state.
Further attempts to open a database that "rekey" was invoked upon while in WAL mode fail, resulting in a corrupt database file that cannot be opened.