Skip to content
Browse files

fix bug 924: Server favorites disappear on second Mumble instance (-m)

On Windows, using journal mode truncate does not seem to work, at least with our Qt / Qt 4.8.
The issue is not limited to the explicit transaction, but occurs even after just the DELETE FROM `servers` query, without a transaction, and also as not a prepared statement.
It does not occur with a single instance accessing the DB, but when more than one are connected to the DB / the DB is opened anew.
Using journal_mode DELETE instead of our optimization to use TRUNCATE fixes the issue. As it seems to be limited to windows, for windows we now use DELETE, and for the rest we still use TRUNCATE.
  • Loading branch information...
Kissaki committed Dec 9, 2012
1 parent 1b2023c commit 001a5c29424edf06ea69184faa4f86d6bb5371be
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/mumble/Database.cpp
@@ -146,7 +146,12 @@ Database::Database() {

query.exec(QLatin1String("PRAGMA synchronous = OFF"));
#ifdef Q_OS_WIN
// Windows can not handle TRUNCATE with multiple connections to the DB. Thus less performant DELETE.
query.exec(QLatin1String("PRAGMA journal_mode = DELETE"));
query.exec(QLatin1String("PRAGMA journal_mode = TRUNCATE"));

query.exec(QLatin1String("SELECT sqlite_version()"));
while (

0 comments on commit 001a5c2

Please sign in to comment.
You can’t perform that action at this time.