Merge pull request #18519 from vrothberg/fix-18356

sqlite: disable WAL mode
This commit is contained in:
OpenShift Merge Robot
2023-05-09 11:48:33 -04:00
committed by GitHub

View File

@ -32,9 +32,7 @@ type SQLiteState struct {
const ( const (
// Deal with timezone automatically. // Deal with timezone automatically.
sqliteOptionLocation = "_loc=auto" sqliteOptionLocation = "_loc=auto"
// Set the journal mode (https://www.sqlite.org/pragma.html#pragma_journal_mode). // Force an fsync after each transaction (https://www.sqlite.org/pragma.html#pragma_synchronous).
sqliteOptionJournal = "&_journal=WAL"
// Force WAL mode to fsync after each transaction (https://www.sqlite.org/pragma.html#pragma_synchronous).
sqliteOptionSynchronous = "&_sync=FULL" sqliteOptionSynchronous = "&_sync=FULL"
// Allow foreign keys (https://www.sqlite.org/pragma.html#pragma_foreign_keys). // Allow foreign keys (https://www.sqlite.org/pragma.html#pragma_foreign_keys).
sqliteOptionForeignKeys = "&_foreign_keys=1" sqliteOptionForeignKeys = "&_foreign_keys=1"
@ -44,7 +42,6 @@ const (
// Assembled sqlite options used when opening the database. // Assembled sqlite options used when opening the database.
sqliteOptions = "db.sql?" + sqliteOptions = "db.sql?" +
sqliteOptionLocation + sqliteOptionLocation +
sqliteOptionJournal +
sqliteOptionSynchronous + sqliteOptionSynchronous +
sqliteOptionForeignKeys + sqliteOptionForeignKeys +
sqliteOptionTXLock sqliteOptionTXLock