/ Check-in [26493379]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added support for -DSQLITE_NO_SYNC to os_win.c. (CVS 5904)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2649337937077d2dba7cdc7473fcd176aa252a52
User & Date: shane 2008-11-13 18:20:43
Context
2008-11-13
18:29
Fixed several more crashes due to corrupt db files. Added corruptC.test to soak.test. (CVS 5905) check-in: 9b7a52e9 user: shane tags: trunk
18:20
Added support for -DSQLITE_NO_SYNC to os_win.c. (CVS 5904) check-in: 26493379 user: shane tags: trunk
18:02
Fixed typo in tkt3472.test that prevented the test from running. (CVS 5903) check-in: 428a5479 user: shane tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to windows.
    14     14   **
    15         -** $Id: os_win.c,v 1.137 2008/11/07 00:06:18 drh Exp $
           15  +** $Id: os_win.c,v 1.138 2008/11/13 18:20:43 shane Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   #if SQLITE_OS_WIN               /* This file is used for windows only */
    19     19   
    20     20   
    21     21   /*
    22     22   ** A Note About Memory Allocation:
................................................................................
   747    747     OSTRACE3("SYNC %d lock=%d\n", pFile->h, pFile->locktype);
   748    748   #ifdef SQLITE_TEST
   749    749     if( flags & SQLITE_SYNC_FULL ){
   750    750       sqlite3_fullsync_count++;
   751    751     }
   752    752     sqlite3_sync_count++;
   753    753   #endif
          754  +  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a
          755  +  ** no-op
          756  +  */
          757  +#ifdef SQLITE_NO_SYNC
          758  +    return SQLITE_OK;
          759  +#else
   754    760     if( FlushFileBuffers(pFile->h) ){
   755    761       return SQLITE_OK;
   756    762     }else{
   757    763       return SQLITE_IOERR;
   758    764     }
          765  +#endif
   759    766   }
   760    767   
   761    768   /*
   762    769   ** Determine the current size of a file in bytes
   763    770   */
   764    771   static int winFileSize(sqlite3_file *id, sqlite3_int64 *pSize){
   765    772     winFile *pFile = (winFile*)id;