I recently upgraded from 4.5.4 and have noticed some curious exceptions (only a few, but still significant) that were not happening before:
android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032)
at net.zetetic.database.sqlcipher.SQLiteConnection.nativeExecuteForChangedRowCount(SQLiteConnection.java)
at net.zetetic.database.sqlcipher.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:818)
at net.zetetic.database.sqlcipher.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:758)
at net.zetetic.database.sqlcipher.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:90)
at net.zetetic.database.sqlcipher.SQLiteDatabase.executeSql(SQLiteDatabase.java:1992)
at net.zetetic.database.sqlcipher.SQLiteDatabase.execSQL(SQLiteDatabase.java:1900)
The old code was running for years with tens of thousands of active installs, without this issue.
Other than migration essentials, nothing else has changed in my code, so it seems that it’s some subtle change in behavior. Any ideas?
Note: for SQLCipherOpenHelper.openDatabase() I’m using defaults for readOnly=false and enableWriteAheadLogging=false