aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-04-05 16:38:12 +0000
committerdrh <drh@noemail.net>2019-04-05 16:38:12 +0000
commite3bd232e2df1f4e6f537ba25764ba7428b6acb22 (patch)
tree94e4d19fb63e1a591f99b07328346ae34a90f8de /src/insert.c
parent86223e8d65a6dc10ad19b5c8aa535baba86a7e5c (diff)
downloadsqlite-e3bd232e2df1f4e6f537ba25764ba7428b6acb22.tar.gz
sqlite-e3bd232e2df1f4e6f537ba25764ba7428b6acb22.zip
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
Diffstat (limited to 'src/insert.c')
-rw-r--r--src/insert.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c
index 575e3a783..ee63eeda5 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -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 */
}
}