]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/ssqlite3.cc
rec: ensure correct service user on debian
[thirdparty/pdns.git] / pdns / ssqlite3.cc
index 8adeb28d24350cee7c0d20c622af31575d41ec40..eb7075388d1af4f7a925f61d8460b6bdc731455b 100644 (file)
@@ -180,7 +180,7 @@ private:
 };
 
 // Constructor.
-SSQLite3::SSQLite3( const std::string & database, bool creat )
+SSQLite3::SSQLite3( const std::string & database, const std::string & journalmode, bool creat )
 {
   if (access( database.c_str(), F_OK ) == -1){
     if (!creat)
@@ -195,6 +195,9 @@ SSQLite3::SSQLite3( const std::string & database, bool creat )
   m_dolog = 0;
   m_in_transaction = false;
   sqlite3_busy_handler(m_pDB, busyHandler, 0);
+
+  if(journalmode.length())
+    execute("PRAGMA journal_mode="+journalmode);
 }
 
 void SSQLite3::setLog(bool state)