ibireme / YYCache

High performance cache framework for iOS.
MIT License
2.38k stars 514 forks source link

Prevent WAL locking by resetting prepared statements after use #129

Open digal opened 6 years ago

digal commented 6 years ago

Should possibly fix unlimited WAL growing (like in #115)

Cached prepared statements in _dbPrepareStmt are not reset until next call, so both automatic and manual checkpoints are failing to occur, causing WAL to grow and never to be merged into main DB file (see http://sqlite.1065341.n5.nabble.com/sqlite3-wal-checkpoint-v2-returning-SQLITE-LOCKED-in-what-circumstances-td86662.html)