VACUUM cannot run within a transaction

This commit is contained in:
M66B 2016-02-13 13:15:43 +01:00
parent baf5df686c
commit 945a9e0f33
1 changed files with 2 additions and 1 deletions

View File

@ -373,12 +373,13 @@ public class DatabaseHelper extends SQLiteOpenHelper {
db.beginTransactionNonExclusive();
try {
db.delete("log", null, new String[]{});
db.execSQL("VACUUM");
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
db.execSQL("VACUUM");
} finally {
mLock.writeLock().unlock();
}