sqlite-utils icon indicating copy to clipboard operation
sqlite-utils copied to clipboard

OperationalError: cannot change into wal mode from within a transaction

Open simonw opened this issue 5 years ago • 2 comments

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

simonw avatar Sep 07 '20 23:09 simonw

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

simonw avatar Sep 07 '20 23:09 simonw

This is already covered in the tests though: https://github.com/simonw/sqlite-utils/blob/deb2eb013ff85bbc828ebc244a9654f0d9c3139e/tests/test_cli.py#L1300-L1328

simonw avatar Sep 07 '20 23:09 simonw