mirror of https://github.com/stella-emu/stella.git
Put DB in WAL mode.
This commit is contained in:
parent
12409cc348
commit
fd8b20290b
|
@ -74,6 +74,11 @@ void SqliteDatabase::initialize()
|
|||
|
||||
throw SqliteError("unable to initialize sqlite DB for unknown reason");
|
||||
};
|
||||
|
||||
exec("PRAGMA journal_mode=WAL");
|
||||
|
||||
if (sqlite3_wal_checkpoint_v2(myHandle, nullptr, SQLITE_CHECKPOINT_TRUNCATE, nullptr, nullptr) != SQLITE_OK)
|
||||
throw SqliteError(sqlite3_errmsg(myHandle));
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue