Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add a couple of missing methods to test_osinst.c.. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5c9e9c06ae350043e66f36087da4021a |
User & Date: | dan 2010-05-22 08:22:40.000 |
Context
2010-05-24
| ||
10:39 | Change the WAL file format to support two kinds of checksums - one that is fast to calculate on little-endian architectures and another that is fast on big-endian architectures. A flag in the wal-header indicates which the file uses. (check-in: 65ba804dd1 user: dan tags: trunk) | |
2010-05-22
| ||
08:22 | Add a couple of missing methods to test_osinst.c.. (check-in: 5c9e9c06ae user: dan tags: trunk) | |
00:55 | Add several EXPENSIVE_ASSERT code blocks to validate the wal-index hash table. Fix the bugs that these code blocks fine. Rename walClearHash() to walCleanupHash() and simplify its interface. (check-in: 7aade899e5 user: drh tags: trunk) | |
Changes
Changes to src/test_osinst.c.
︙ | ︙ | |||
13 14 15 16 17 18 19 | ** This file contains the implementation of an SQLite vfs wrapper that ** adds instrumentation to all vfs and file methods. C and Tcl interfaces ** are provided to control the instrumentation. */ /* ** This module contains code for a wrapper VFS that causes a log of | | | | | > > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ** This file contains the implementation of an SQLite vfs wrapper that ** adds instrumentation to all vfs and file methods. C and Tcl interfaces ** are provided to control the instrumentation. */ /* ** This module contains code for a wrapper VFS that causes a log of ** most VFS calls to be written into a nominated file on disk. The log ** is stored in a compressed binary format to reduce the amount of IO ** overhead introduced into the application by logging. ** ** All calls on sqlite3_file objects except xFileControl() are logged. ** Additionally, calls to the xAccess(), xOpen(), xDelete() and xRename() ** methods are logged. The other sqlite3_vfs object methods (xDlXXX, ** xRandomness, xSleep, xCurrentTime, xGetLastError and xCurrentTimeInt64) ** are not logged. ** ** The binary log files are read using a virtual table implementation ** also contained in this file. ** ** CREATING LOG FILES: ** ** int sqlite3_vfslog_new( |
︙ | ︙ | |||
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | static void vfslogDlError(sqlite3_vfs*, int nByte, char *zErrMsg); static void (*vfslogDlSym(sqlite3_vfs *pVfs, void *p, const char*zSym))(void); static void vfslogDlClose(sqlite3_vfs*, void*); static int vfslogRandomness(sqlite3_vfs*, int nByte, char *zOut); static int vfslogSleep(sqlite3_vfs*, int microseconds); static int vfslogCurrentTime(sqlite3_vfs*, double*); static sqlite3_vfs vfslog_vfs = { 1, /* iVersion */ sizeof(VfslogFile), /* szOsFile */ INST_MAX_PATHNAME, /* mxPathname */ 0, /* pNext */ 0, /* zName */ 0, /* pAppData */ vfslogOpen, /* xOpen */ vfslogDelete, /* xDelete */ vfslogAccess, /* xAccess */ vfslogFullPathname, /* xFullPathname */ vfslogDlOpen, /* xDlOpen */ vfslogDlError, /* xDlError */ vfslogDlSym, /* xDlSym */ vfslogDlClose, /* xDlClose */ vfslogRandomness, /* xRandomness */ vfslogSleep, /* xSleep */ vfslogCurrentTime, /* xCurrentTime */ }; static sqlite3_io_methods vfslog_io_methods = { 2, /* iVersion */ vfslogClose, /* xClose */ vfslogRead, /* xRead */ vfslogWrite, /* xWrite */ | > > > > > > > | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | static void vfslogDlError(sqlite3_vfs*, int nByte, char *zErrMsg); static void (*vfslogDlSym(sqlite3_vfs *pVfs, void *p, const char*zSym))(void); static void vfslogDlClose(sqlite3_vfs*, void*); static int vfslogRandomness(sqlite3_vfs*, int nByte, char *zOut); static int vfslogSleep(sqlite3_vfs*, int microseconds); static int vfslogCurrentTime(sqlite3_vfs*, double*); static int vfslogGetLastError(sqlite3_vfs*, int, char *); static int vfslogRename(sqlite3_vfs*, const char *, const char *, int); static int vfslogCurrentTimeInt64(sqlite3_vfs*, sqlite3_int64*); static sqlite3_vfs vfslog_vfs = { 1, /* iVersion */ sizeof(VfslogFile), /* szOsFile */ INST_MAX_PATHNAME, /* mxPathname */ 0, /* pNext */ 0, /* zName */ 0, /* pAppData */ vfslogOpen, /* xOpen */ vfslogDelete, /* xDelete */ vfslogAccess, /* xAccess */ vfslogFullPathname, /* xFullPathname */ vfslogDlOpen, /* xDlOpen */ vfslogDlError, /* xDlError */ vfslogDlSym, /* xDlSym */ vfslogDlClose, /* xDlClose */ vfslogRandomness, /* xRandomness */ vfslogSleep, /* xSleep */ vfslogCurrentTime, /* xCurrentTime */ vfslogGetLastError, /* xGetLastError */ vfslogRename, /* xRename */ vfslogCurrentTimeInt64 /* xCurrentTime */ }; static sqlite3_io_methods vfslog_io_methods = { 2, /* iVersion */ vfslogClose, /* xClose */ vfslogRead, /* xRead */ vfslogWrite, /* xWrite */ |
︙ | ︙ | |||
605 606 607 608 609 610 611 612 613 614 615 616 617 618 | /* ** Return the current time as a Julian Day number in *pTimeOut. */ static int vfslogCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){ return REALVFS(pVfs)->xCurrentTime(REALVFS(pVfs), pTimeOut); } static void vfslog_flush(VfslogVfs *p){ #ifdef SQLITE_TEST extern int sqlite3_io_error_pending; extern int sqlite3_io_error_persist; extern int sqlite3_diskfull_pending; | > > > > > > > > > > | 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 | /* ** Return the current time as a Julian Day number in *pTimeOut. */ static int vfslogCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){ return REALVFS(pVfs)->xCurrentTime(REALVFS(pVfs), pTimeOut); } static int vfslogGetLastError(sqlite3_vfs *pVfs, int a, char *b){ return REALVFS(pVfs)->xGetLastError(REALVFS(pVfs), a, b); } static int vfslogRename(sqlite3_vfs *pVfs, const char *a, const char *b, int c){ return REALVFS(pVfs)->xRename(REALVFS(pVfs), a, b, c); } static int vfslogCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *p){ return REALVFS(pVfs)->xCurrentTimeInt64(REALVFS(pVfs), p); } static void vfslog_flush(VfslogVfs *p){ #ifdef SQLITE_TEST extern int sqlite3_io_error_pending; extern int sqlite3_io_error_persist; extern int sqlite3_diskfull_pending; |
︙ | ︙ |