1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Get the io.test tests working on windows. (CVS 4381)

FossilOrigin-Name: 1be70015e24f715a4276f253d2e0c0eec44650ee
This commit is contained in:
drh
2007-09-03 17:02:50 +00:00
parent dfdcf2c582
commit dec6fae9d9
6 changed files with 55 additions and 31 deletions

View File

@@ -711,12 +711,27 @@ static int winTruncate(sqlite3_file *id, i64 nByte){
return SQLITE_OK;
}
#ifdef SQLITE_TEST
/*
** Count the number of fullsyncs and normal syncs. This is used to test
** that syncs and fullsyncs are occuring at the right times.
*/
int sqlite3_sync_count = 0;
int sqlite3_fullsync_count = 0;
#endif
/*
** Make sure all writes to a particular file are committed to disk.
*/
static int winSync(sqlite3_file *id, int flags){
winFile *pFile = (winFile*)id;
OSTRACE3("SYNC %d lock=%d\n", pFile->h, pFile->locktype);
#ifdef SQLITE_TEST
if( flags & SQLITE_SYNC_FULL ){
sqlite3_fullsync_count++;
}
sqlite3_sync_count++;
#endif
if( FlushFileBuffers(pFile->h) ){
return SQLITE_OK;
}else{