2 ms·
As an informed guess: backward compatibility. This way an SQLite library which has never heard of a WAL2 file will just use WAL mode instead, instead of potent
by samatman 4y ago
As an informed guess: backward compatibility.
This way an SQLite library which has never heard of a WAL2 file will just use WAL mode instead, instead of potentially being confused by the unheard-of existence of multiple .wal files.
- ok_dad 4y agoI don't think that would work; there is also a -wal2 file which might be the active WAL file at the time a DB was closed. If you took an older library and tried to open that same DB, you would lose the data in the -wal2 file since that older library would ignore it.
- samatman 4y agoYou won't have a wal2 unless one of these connections generated it. The question is, can sqlite+wal2 write to a database while sqlite+wal is writing to it, without terrible things happening. The answer kinda has to be 'yes' right? This is SQLite we're speculating about here.