Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 132819a5 authored by Steve Kondik's avatar Steve Kondik
Browse files

Revert "Don't bail if we can't set WAL mode on an SQLite database"

This reverts commit b00dcebf.
parent 9423a656
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -126,7 +126,12 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags)
    // Configure databases to run in WAL mode.
    err = sqlite3_exec(handle,"PRAGMA journal_mode = WAL;",
                       NULL, NULL,&zErrMsg);
    if (SQLITE_OK == err) {
    if (SQLITE_OK != err) {
       LOGE("sqlite3_exec to set journal_mode = WAL failed\n");
       throw_sqlite3_exception(env, handle);
       goto done;
    }

    // Set autocheckpoint = 100 pages
    err = sqlite3_wal_autocheckpoint(handle,
                                     100);
@@ -135,9 +140,6 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags)
       throw_sqlite3_exception(env, handle);
       goto done;
    }
    } else {
       LOGE("sqlite3_exec to set journal_mode = WAL failed\n");
    }

    // The soft heap limit prevents the page cache allocations from growing
    // beyond the given limit, no matter what the max page cache sizes are