1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Add the ability to override the new corruption detection logic

of the previous checkin, in order to exercise downstream corruption
detection during testing.

FossilOrigin-Name: e859d3184606dd453b9fc4ee388922d7be4b61aad84a66ac82107935ffd56f3a
This commit is contained in:
drh
2019-04-05 16:38:12 +00:00
parent 86223e8d65
commit e3bd232e2d
3 changed files with 12 additions and 8 deletions

View File

@@ -2275,7 +2275,11 @@ static int xferOptimization(
if( pSrcIdx==0 ){
return 0; /* pDestIdx has no corresponding index in pSrc */
}
if( pSrcIdx->tnum==pDestIdx->tnum && pSrc->pSchema==pDest->pSchema ){
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 */
}
}