Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Additional coverage testing. (CVS 3823) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
26b2e1aede3f776134b2d6e941d17a90 |
User & Date: | drh 2007-04-06 18:23:18.000 |
Context
2007-04-06
| ||
21:42 | Changes to test scripts to support alternative configurations. (CVS 3824) (check-in: 3471a2269f user: drh tags: trunk) | |
18:23 | Additional coverage testing. (CVS 3823) (check-in: 26b2e1aede user: drh tags: trunk) | |
15:02 | Binary file I/O infrastructure added and used to increase test coverage for detection of corrupt database files. (CVS 3822) (check-in: 479b3d965b user: drh tags: trunk) | |
Changes
Changes to src/os_unix.c.
︙ | |||
915 916 917 918 919 920 921 | 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | - + - - - - | ** *id unchanged. */ static int unixOpenDirectory( OsFile *id, const char *zDirname ){ unixFile *pFile = (unixFile*)id; |
︙ | |||
996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 | 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 | + + + | */ static int seekAndRead(unixFile *id, void *pBuf, int cnt){ int got; i64 newOffset; TIMER_START; #if defined(USE_PREAD) got = pread(id->h, pBuf, cnt, id->offset); SimulateIOError( got = -1 ); #elif defined(USE_PREAD64) got = pread64(id->h, pBuf, cnt, id->offset); SimulateIOError( got = -1 ); #else newOffset = lseek(id->h, id->offset, SEEK_SET); SimulateIOError( newOffset-- ); if( newOffset!=id->offset ){ return -1; } got = read(id->h, pBuf, cnt); #endif TIMER_END; OSTRACE5("READ %-3d %5d %7lld %d\n", id->h, got, id->offset, TIMER_ELAPSED); |
︙ | |||
1022 1023 1024 1025 1026 1027 1028 | 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 | - | ** bytes were read successfully and SQLITE_IOERR if anything goes ** wrong. */ static int unixRead(OsFile *id, void *pBuf, int amt){ int got; assert( id ); got = seekAndRead((unixFile*)id, pBuf, amt); |
︙ |
Changes to src/pager.c.
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | ** The pager is used to access a database disk file. It implements ** atomic commit and rollback through the use of a journal file that ** is separate from the database file. The pager also implements file ** locking to prevent two processes from writing the same database ** file simultaneously, or one process from reading the database while ** another is writing. ** |
︙ | |||
2504 2505 2506 2507 2508 2509 2510 | 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 | - - + + + + + + | ** ** If the current size of the database file is 0 but a journal file ** exists, that is probably an old journal left over from a prior ** database with the same name. Just delete the journal. */ static int hasHotJournal(Pager *pPager){ if( !pPager->useJournal ) return 0; |
︙ |
Added test/lock4.test.