/ Check-in [e859d318]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Add the ability to override the new corruption detection logic of the previous checkin, in order to exercise downstream corruption detection during testing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e859d3184606dd453b9fc4ee388922d7be4b61aad84a66ac82107935ffd56f3a
User & Date: drh 2019-04-05 16:38:12
Context
2019-04-05
16:52
In the test_vfs.c VFS, if a Tcl xWrite script returns "SQLITE_OMIT", silently omit the write() call. check-in: 8b5a621e user: dan tags: trunk
16:38
Add the ability to override the new corruption detection logic of the previous checkin, in order to exercise downstream corruption detection during testing. check-in: e859d318 user: drh tags: trunk
15:44
In the xfer-optimization, do early detection of when the source and destination index share the same btree, to avoid a long delay prior to reporting the database corruption. check-in: af1e5873 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/insert.c.

  2271   2271       }
  2272   2272       for(pSrcIdx=pSrc->pIndex; pSrcIdx; pSrcIdx=pSrcIdx->pNext){
  2273   2273         if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
  2274   2274       }
  2275   2275       if( pSrcIdx==0 ){
  2276   2276         return 0;    /* pDestIdx has no corresponding index in pSrc */
  2277   2277       }
  2278         -    if( pSrcIdx->tnum==pDestIdx->tnum && pSrc->pSchema==pDest->pSchema ){
         2278  +    if( pSrcIdx->tnum==pDestIdx->tnum && pSrc->pSchema==pDest->pSchema
         2279  +         && sqlite3FaultSim(411)==SQLITE_OK ){
         2280  +      /* The sqlite3FaultSim() call allows this corruption test to be
         2281  +      ** bypassed during testing, in order to exercise other corruption tests
         2282  +      ** further downstream. */
  2279   2283         return 0;   /* Corrupt schema - two indexes on the same btree */
  2280   2284       }
  2281   2285     }
  2282   2286   #ifndef SQLITE_OMIT_CHECK
  2283   2287     if( pDest->pCheck && sqlite3ExprListCompare(pSrc->pCheck,pDest->pCheck,-1) ){
  2284   2288       return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */
  2285   2289     }