mirror of https://github.com/M66B/NetGuard.git
VACUUM cannot run within a transaction
This commit is contained in:
parent
baf5df686c
commit
945a9e0f33
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue