* 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
					
				
					 2 changed files with 4 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -327,10 +327,9 @@ void LocalStore::openDB(bool create)
 | 
			
		|||
    if (sqlite3_exec(db, ("pragma synchronous = " + syncMode + ";").c_str(), 0, 0, 0) != SQLITE_OK)
 | 
			
		||||
        throwSQLiteError(db, "setting synchronous mode");
 | 
			
		||||
 | 
			
		||||
    /* Set the SQLite journal mode.  WAL mode is fastest, but doesn't
 | 
			
		||||
       seem entirely stable at the moment (Oct. 2010).  Thus, use
 | 
			
		||||
       truncate mode by default. */
 | 
			
		||||
    string mode = queryBoolSetting("use-sqlite-wal", false) ? "wal" : "truncate";
 | 
			
		||||
    /* Set the SQLite journal mode.  WAL mode is fastest, so it's the
 | 
			
		||||
       default. */
 | 
			
		||||
    string mode = queryBoolSetting("use-sqlite-wal", true) ? "wal" : "truncate";
 | 
			
		||||
    string prevMode;
 | 
			
		||||
    {
 | 
			
		||||
        SQLiteStmt stmt;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue