diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-07-04 20:54:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-04 20:54:57 +0200 |
| commit | 7587fe56d83fd6b3031cb11a91d94b9348c08846 (patch) | |
| tree | c1accc3d63cdb1b34ec11bb7657595de8a983bba /Emby.Server.Implementations/Data/BaseSqliteRepository.cs | |
| parent | b136f1408481661df7666652e75625e877873299 (diff) | |
Moved VACUUM down to the end of the list.
Diffstat (limited to 'Emby.Server.Implementations/Data/BaseSqliteRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Data/BaseSqliteRepository.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs index 821c4b448..eabe7d120 100644 --- a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs +++ b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs @@ -202,8 +202,7 @@ namespace Emby.Server.Implementations.Data protected void RunDefaultInitialization(ManagedConnection db) { var queries = new List<string> - { - "VACUUM", + { "PRAGMA journal_mode=WAL", "PRAGMA page_size=4096", "PRAGMA synchronous=Normal" @@ -224,6 +223,8 @@ namespace Emby.Server.Implementations.Data "pragma temp_store = file" }); } + // Configuration and pragmas can affect VACUUM so it needs to be last. + queries.Add("VACUUM"); db.ExecuteAll(string.Join(";", queries)); Logger.LogInformation("PRAGMA synchronous=" + db.Query("PRAGMA synchronous").SelectScalarString().First()); |
