[prev in list] [next in list] [prev in thread] [next in thread]
List: mandoc-source
Subject: mdocml: Turning off synchronous mode logically belongs to opening the
From: schwarze () mdocml ! bsd ! lv
Date: 2013-07-02 12:58:55
Message-ID: 201307021258.r62CwtgP004317 () krisdoz ! my ! domain
[Download RAW message or body]
Log Message:
-----------
Turning off synchronous mode logically belongs to opening the database,
so move the statement into the function dbopen().
Modified Files:
--------------
mdocml:
mandocdb.c
Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandocdb.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.69 -r1.70
--- mandocdb.c
+++ mandocdb.c
@@ -471,15 +471,6 @@ main(int argc, char *argv[])
if (0 == dbopen(0))
goto out;
- /*
- * Since we're opening up a new database, we can
- * turn off synchronous mode for much better
- * performance.
- */
-#ifndef __APPLE__
- SQL_EXEC("PRAGMA synchronous = OFF");
-#endif
-
ofmerge(mc, mp, &str_info, warnings && !use_all);
dbclose(0);
@@ -1972,6 +1963,17 @@ prepare_statements:
sql = "INSERT INTO keys "
"(bits,key,docid) VALUES (?,?,?)";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_INSERT_KEY], NULL);
+
+#ifndef __APPLE__
+ /*
+ * When opening a new database, we can turn off
+ * synchronous mode for much better performance.
+ */
+
+ if (real)
+ SQL_EXEC("PRAGMA synchronous = OFF");
+#endif
+
return(1);
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic