sqlite-utils
sqlite-utils copied to clipboard
OperationalError: cannot change into wal mode from within a transaction
I'm getting this error when running:
sqlite-utils enable-wal beta.db
OperationalError: cannot change into wal mode from within a transaction
I'm worried that maybe that's because of this new code from #152:
https://github.com/simonw/sqlite-utils/blob/deb2eb013ff85bbc828ebc244a9654f0d9c3139e/sqlite_utils/db.py#L128-L129
Running this against the same file works:
$ sqlite3 beta.db
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> PRAGMA journal_mode=wal;
wal
This is already covered in the tests though: https://github.com/simonw/sqlite-utils/blob/deb2eb013ff85bbc828ebc244a9654f0d9c3139e/tests/test_cli.py#L1300-L1328