Skip to content

Commit bfc66f1

Browse files
authored
Merge pull request #1280 from Scony/journal-size-limit-238
[wpe-2.38] Prevent journal files from wasting disk space
2 parents 97a554d + 1c7e1f5 commit bfc66f1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Source/WebCore/platform/sql/SQLiteDatabase.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ bool SQLiteDatabase::open(const String& filename, OpenMode openMode)
152152
LOG_ERROR("SQLite database could not set temp_store to memory");
153153
}
154154

155+
{
156+
SQLiteTransactionInProgressAutoCounter transactionCounter;
157+
// prevent wasting disk space, see https://www.sqlite.org/pragma.html#pragma_journal_size_limit
158+
executeCommand("PRAGMA journal_size_limit = 0;"_s);
159+
}
160+
155161
if (filename != inMemoryPath()) {
156162
if (openMode != OpenMode::ReadOnly && !useWALJournalMode())
157163
return false;

0 commit comments

Comments
 (0)