Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Activate test cases for new journal format. (CVS 1687) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
197d00d6a6a440848a0b471015727255 |
User & Date: | danielk1977 2004-06-25 06:23:23.000 |
Context
2004-06-25
| ||
07:21 | Add a comment on the implementation of sqlite3OsLock(). No code changes. (CVS 1688) (check-in: 084f3fffbd user: danielk1977 tags: trunk) | |
06:23 | Activate test cases for new journal format. (CVS 1687) (check-in: 197d00d6a6 user: danielk1977 tags: trunk) | |
02:38 | Modifications to the journal format to make it more robust. (CVS 1686) (check-in: 504246a18d user: danielk1977 tags: trunk) | |
Changes
Changes to src/os_test.c.
︙ | |||
186 187 188 189 190 191 192 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - + | if( rc!=SQLITE_OK ) return rc; } } return SQLITE_OK; } |
︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + | if( p ){ int skip = 0; int trash = 0; if( crash ){ char random; sqlite3Randomness(1, &random); if( random & 0x01 ){ |
︙ | |||
261 262 263 264 265 266 267 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + | */ static int writeCache(OsTestFile *pFile){ if( pFile->apBlk ){ int c = crashRequired(pFile->zName); if( c ){ OsTestFile *p; #ifdef TRACE_WRITECACHE |
︙ |
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. ** |
︙ | |||
2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 | 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 | + | /* If in full-sync mode, write a new journal header into the ** journal file. This is done to avoid ever modifying a journal ** header that is involved in the rollback of pages that have ** already been written to the database (in case the header is ** trashed when the nRec field is updated). */ pPager->nRec = 0; assert( pPager->journalOff > 0 ); rc = writeJournalHdr(pPager); if( rc!=0 ){ sqlite3pager_rollback(pPager); return SQLITE_IOERR; } } pPg = pPager->pFirst; |
︙ |
Changes to test/crash.test.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | - + - + + - + - + - - - - - + + + - - - - + + + + - - - - + + + + + + + + + + + + - + - + | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. # |
︙ | |||
222 223 224 225 226 227 228 | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | + - + + + | # crash-4.3.*: Test recovery when crash occurs during sync() of the master # journal file. # do_test crash-4.0 { file delete -force test2.db file delete -force test2.db-journal sqlite3 db2 test2.db execsql { |
︙ | |||
298 299 300 301 302 303 304 | 308 309 310 311 312 313 314 315 | - | signature } $sig do_test crash-4.3.$i.3 { signature2 } $sig2 } |