* Use normal (rather than full) synchronous mode, which I gather from

the description at http://www.sqlite.org/atomiccommit.html should be
  safe enough.
This commit is contained in:
Eelco Dolstra 2010-02-24 10:57:57 +00:00
parent 8520de4720
commit 462bd50aef
1 changed files with 4 additions and 0 deletions

View File

@ -219,6 +219,10 @@ LocalStore::LocalStore()
/* !!! check whether sqlite has been built with foreign key
support */
/* "Normal" synchronous mode should be safe enough. */
if (sqlite3_exec(db, "pragma synchronous = normal;", 0, 0, 0) != SQLITE_OK)
throw SQLiteError(db, "changing synchronous mode to normal");
/* Check the current database schema and if necessary do an
upgrade. !!! Race condition: several processes could start
the upgrade at the same time. */