SQLite

Check-in [b3109f85bd]
Login

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

Overview
Comment:Added implementation of vfslog_time() for Windows testing.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b3109f85bde0b24bfbcfe6c0f7bbe973be196c1d
User & Date: shaneh 2010-06-02 16:40:55.000
Context
2010-06-02
17:15
If an error occurs while writing frames to the log to commit a transaction, do not mark the pages as clean in the cache. Otherwise, the subsequent rollback does not roll them back (leaving the client to continue with a cache that makes it appear that the transaction was committed - inconsistent with the database on disk). (check-in: cb571c1b71 user: dan tags: trunk)
16:40
Added implementation of vfslog_time() for Windows testing. (check-in: b3109f85bd user: shaneh tags: trunk)
16:39
Updated wal2.test for windows testing. (check-in: c3606f3985 user: shaneh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/test_osinst.c.
227
228
229
230
231
232
233
















234
235
236
237
238
239
240
#if defined(SQLITE_OS_UNIX) && !defined(NO_GETTOD)
#include <sys/time.h>
static sqlite3_uint64 vfslog_time(){
  struct timeval sTime;
  gettimeofday(&sTime, 0);
  return sTime.tv_usec + (sqlite3_uint64)sTime.tv_sec * 1000000;
}
















#else
static sqlite3_uint64 vfslog_time(){
  return 0;
}
#endif

static void vfslog_call(sqlite3_vfs *, int, int, int, int, int, int);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
#if defined(SQLITE_OS_UNIX) && !defined(NO_GETTOD)
#include <sys/time.h>
static sqlite3_uint64 vfslog_time(){
  struct timeval sTime;
  gettimeofday(&sTime, 0);
  return sTime.tv_usec + (sqlite3_uint64)sTime.tv_sec * 1000000;
}
#elif defined(SQLITE_OS_WIN)
#include <windows.h>
#include <time.h>
static sqlite3_uint64 vfslog_time(){
  FILETIME ft;
  sqlite3_uint64 u64time = 0;
 
  GetSystemTimeAsFileTime(&ft);

  u64time |= ft.dwHighDateTime;
  u64time <<= 32;
  u64time |= ft.dwLowDateTime;

  /* ft is 100-nanosecond intervals, we want microseconds */
  return u64time /(sqlite3_uint64)10;
}
#else
static sqlite3_uint64 vfslog_time(){
  return 0;
}
#endif

static void vfslog_call(sqlite3_vfs *, int, int, int, int, int, int);