summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2018-08-24 13:38:40 -0700
committerMakoto Onuki <omakoto@google.com>2018-09-24 22:47:02 +0000
commit0939c5a2b313d7fc32ca5e1a6c161b0089e141e9 (patch)
tree3accc1be6ef98fc2ef481e9ee84789ab0c02a7dc /tools/aapt2/java/JavaClassGenerator_test.cpp
parentf76c383f82437814a8c8dfffc04d85b6c251d5ff (diff)
Truncate(*1) it if WAL file is too big when opening DB
*1 -- not truncate(2) but "PRAGMA wal_checkpoint(TRUNCATE)" Otherwise, depending on how an app operate on a DB, SQLite may not have a chance to "shrink" the WAL file. Fixes: 112777941 Bug: 111939259 Test: atest /android/master/frameworks/base/core/tests/coretests/src/android/database/sqlite/SQLiteCompatibilityWalFlagsTest.java Test: Manual test with google dailer: 1. With normalized_spam.db-wal > 100MB and receive a phone call -> WAL file gets truncated to 0 bytes. 2. Restart the dialer process and receive a phone call again -> WAL file is already 0 bytes; won't be truncated. 3. Restart with the WAL file deleted Same as #2. WAL file will be created before the added logic, but is 0 bytes, so it won't be truncated. 4. Test with settings put global sqlite_compatibility_wal_flags truncate_size=1024 -> make sure the threshold is overridden Merged-in: I2b193603e5dfa493ccccb8123db592f0e9c0e7ae Change-Id: I2b193603e5dfa493ccccb8123db592f0e9c0e7ae (cherry picked from commit 96e06002edc374511c545d96ae9b2b7c1e8d78ec)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions