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();
|
db.beginTransactionNonExclusive();
|
||||||
try {
|
try {
|
||||||
db.delete("log", null, new String[]{});
|
db.delete("log", null, new String[]{});
|
||||||
db.execSQL("VACUUM");
|
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
db.setTransactionSuccessful();
|
||||||
} finally {
|
} finally {
|
||||||
db.endTransaction();
|
db.endTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db.execSQL("VACUUM");
|
||||||
} finally {
|
} finally {
|
||||||
mLock.writeLock().unlock();
|
mLock.writeLock().unlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue