r10233: add commented PRAGMA to avoid fsyncs
authorSimo Sorce <idra@samba.org>
Wed, 14 Sep 2005 23:14:42 +0000 (23:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:38:10 +0000 (13:38 -0500)
(This used to be commit e5d8d834600040793c1e45c7aaceb374df2b3839)

source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c

index e283e6b0c15b7249e392e6f13deef883250c4ec1..5cee239b5c89917aade21fb672966cc47363dd7f 100644 (file)
@@ -1616,7 +1616,7 @@ static int initialize(struct lsqlite3_private *lsqlite3, const char *url)
                 /*
                  * Triggers
                  */
-                
                 "CREATE TRIGGER ldb_object_classes_insert_tr"
                 "  AFTER INSERT"
                 "  ON ldb_object_classes"
@@ -1637,7 +1637,7 @@ static int initialize(struct lsqlite3_private *lsqlite3, const char *url)
                 "        SET max_child_num = max_child_num + 1"
                 "        WHERE class_name = new.parent_class_name;"
                 "    END;"
-                
+
                 /*
                  * Table initialization
                  */
@@ -1667,6 +1667,12 @@ static int initialize(struct lsqlite3_private *lsqlite3, const char *url)
                         return -1;
         }
         
+       /* DANGEROUS
+        if (query_norows(lsqlite3, "PRAGMA synchronous = OFF;") != 0) {
+                        return -1;
+        }
+       */
+        
         /* Establish a busy timeout of 30 seconds */
         if ((ret = sqlite3_busy_timeout(lsqlite3->sqlite,
                                         30000)) != SQLITE_OK) {