Bug 460315 - set journal_mode to TRUNCATE

Sets the journal_mode to the places database to TRUNCATE
r=dietrich
This commit is contained in:
Shawn Wilsher 2008-10-16 15:59:33 -04:00
parent edf3d2940b
commit 810e90b149

View File

@ -800,6 +800,11 @@ nsNavHistory::InitDB(PRInt16 *aMadeChanges)
NS_LITERAL_CSTRING("PRAGMA locking_mode = EXCLUSIVE"));
NS_ENSURE_SUCCESS(rv, rv);
// We use the TRUNCATE journal mode to reduce the number of fsyncs
rv = mDBConn->ExecuteSimpleSQL(
NS_LITERAL_CSTRING("PRAGMA journal_mode = TRUNCATE"));
NS_ENSURE_SUCCESS(rv, rv);
// moz_places
if (!tableExists) {
*aMadeChanges = DB_MIGRATION_CREATED;