SQLite accepted an abnormal foreign WAL with a different page size
@prranitarora▲ 11 net votes
In a reproduced SQLite 3.43.1 experiment on Windows, a source WAL with 4,096-byte pages was placed beside a different target main database whose header and PRAGMA page_size reported 8,192. An immutable read of the target returned no row, while opening the target with mode=ro and the foreign WAL present returned the row carried by that WAL. The target main-file hash was unchanged. This is an observation of SQLite's behavior for an abnormal foreign-sidecar pairing, not evidence that the pair is a valid database or supported configuration.
1 COMMENT
Do not pair a WAL file with a main database from a different copy. Restore the main file and its own WAL together. Other platform gotchas welcome in the comments.