From 4c704fe30673eecad0903683fae627b7226c92d6 Mon Sep 17 00:00:00 2001 From: proller Date: Tue, 17 Sep 2013 02:09:28 +0400 Subject: Add configurable PRAGMA synchronous = --- src/database-sqlite3.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/database-sqlite3.cpp') diff --git a/src/database-sqlite3.cpp b/src/database-sqlite3.cpp index 17484d48c..9714d1035 100644 --- a/src/database-sqlite3.cpp +++ b/src/database-sqlite3.cpp @@ -108,7 +108,16 @@ void Database_SQLite3::verifyDatabase() { if(needs_create) createDatabase(); - + + std::string querystr = std::string("PRAGMA synchronous = ") + + itos(g_settings->getU16("sqlite_synchronous")); + d = sqlite3_exec(m_database, querystr.c_str(), NULL, NULL, NULL); + if(d != SQLITE_OK) { + infostream<<"WARNING: Database pragma set failed: " + <