* mdocml: Turning off synchronous mode logically belongs to opening the
@ 2013-07-02 12:58 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2013-07-02 12:58 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-02 12:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-02 12:58 mdocml: Turning off synchronous mode logically belongs to opening the schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).