* Boldly make SQLite WAL mode the default again. Hopefully the
intermittent problems are gone by now. WAL mode is preferrable because it does way fewer fsyncs.
This commit is contained in:
parent
a6a3f3a8c2
commit
c0b706213d
|
@ -255,7 +255,7 @@ AC_ARG_WITH(sqlite, AC_HELP_STRING([--with-sqlite=PATH],
|
||||||
[prefix of SQLite]),
|
[prefix of SQLite]),
|
||||||
sqlite=$withval, sqlite=)
|
sqlite=$withval, sqlite=)
|
||||||
AM_CONDITIONAL(HAVE_SQLITE, test -n "$sqlite")
|
AM_CONDITIONAL(HAVE_SQLITE, test -n "$sqlite")
|
||||||
SQLITE_VERSION=3070701
|
SQLITE_VERSION=3070900
|
||||||
AC_SUBST(SQLITE_VERSION)
|
AC_SUBST(SQLITE_VERSION)
|
||||||
if test -z "$sqlite"; then
|
if test -z "$sqlite"; then
|
||||||
sqlite_lib='${top_builddir}/externals/sqlite-autoconf-$(SQLITE_VERSION)/libsqlite3.la'
|
sqlite_lib='${top_builddir}/externals/sqlite-autoconf-$(SQLITE_VERSION)/libsqlite3.la'
|
||||||
|
|
|
@ -327,10 +327,9 @@ void LocalStore::openDB(bool create)
|
||||||
if (sqlite3_exec(db, ("pragma synchronous = " + syncMode + ";").c_str(), 0, 0, 0) != SQLITE_OK)
|
if (sqlite3_exec(db, ("pragma synchronous = " + syncMode + ";").c_str(), 0, 0, 0) != SQLITE_OK)
|
||||||
throwSQLiteError(db, "setting synchronous mode");
|
throwSQLiteError(db, "setting synchronous mode");
|
||||||
|
|
||||||
/* Set the SQLite journal mode. WAL mode is fastest, but doesn't
|
/* Set the SQLite journal mode. WAL mode is fastest, so it's the
|
||||||
seem entirely stable at the moment (Oct. 2010). Thus, use
|
default. */
|
||||||
truncate mode by default. */
|
string mode = queryBoolSetting("use-sqlite-wal", true) ? "wal" : "truncate";
|
||||||
string mode = queryBoolSetting("use-sqlite-wal", false) ? "wal" : "truncate";
|
|
||||||
string prevMode;
|
string prevMode;
|
||||||
{
|
{
|
||||||
SQLiteStmt stmt;
|
SQLiteStmt stmt;
|
||||||
|
|
Loading…
Reference in a new issue