Enable additional sqlite pragmas for robustness 38/189238/2
authorKonrad Lipinski <k.lipinski2@partner.samsung.com>
Fri, 14 Sep 2018 12:14:17 +0000 (14:14 +0200)
committerKonrad Lipinski <k.lipinski2@partner.samsung.com>
Wed, 3 Oct 2018 08:56:06 +0000 (08:56 +0000)
Change-Id: Ideaa585912143665ba9e288506af9d41679b029b

src/dpl/db/src/sql_connection.cpp

index 9a9033e..ff79220 100644 (file)
@@ -626,6 +626,12 @@ void SqlConnection::Connect(const std::string &address,
         ThrowMsg(Exception::ConnectionBroken, address);
     }
 
+    //TODO neither security-manager-tests nor unit tests are ready for this
+    //ExecCommand("PRAGMA locking_mode=EXCLUSIVE");
+
+    ExecCommand("PRAGMA synchronous=EXTRA"); // safety
+    ExecCommand("PRAGMA temp_store=MEMORY"); // harmless optimization
+
     // Enable foreign keys
     TurnOnForeignKeys();
 }