SQLITE_NOTICE(283): recovered 1 frames from WAL file /fossil/sqlite.fossil-wal

SQLite: Check-in [e859d318]
/ 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 Unified Diffs Ignore Whitespace Patch

Changes to src/insert.c.
2271
2272
2273
2274
2275
2276
2277
2278




2279
2280
2281
2282
2283
2284
2285
    }
    for(pSrcIdx=pSrc->pIndex; pSrcIdx; pSrcIdx=pSrcIdx->pNext){
      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
    }
    if( pSrcIdx==0 ){
      return 0;    /* pDestIdx has no corresponding index in pSrc */
    }
    if( pSrcIdx->tnum==pDestIdx->tnum && pSrc->pSchema==pDest->pSchema ){




      return 0;   /* Corrupt schema - two indexes on the same btree */
    }
  }
#ifndef SQLITE_OMIT_CHECK
  if( pDest->pCheck && sqlite3ExprListCompare(pSrc->pCheck,pDest->pCheck,-1) ){
    return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */
  }







|
>
>
>
>







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