aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2022-03-07 18:32:08 +0000
committerdrh <>2022-03-07 18:32:08 +0000
commitec9b622fbf47ec01765cab43df087dfdc4c7720a (patch)
tree496dfa50117520a1c8ab806d559e3ba918309a5b /src
parent42bb09c41289e9ed4196643c97f9fb458826503c (diff)
downloadsqlite-ec9b622fbf47ec01765cab43df087dfdc4c7720a.tar.gz
sqlite-ec9b622fbf47ec01765cab43df087dfdc4c7720a.zip
Disable an assert in moveToRoot() when the database is corrupt.
[forum:/forumpost/e9a176b7bd|Forum post e9a176b7bd]. FossilOrigin-Name: ae464a18d74bf44fc95bc335e75e6a57dc974f6d6a3d603133594039fb589af2
Diffstat (limited to 'src')
-rw-r--r--src/btree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index d6aec1af3..95170a151 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -5377,7 +5377,7 @@ static int moveToRoot(BtCursor *pCur){
pCur->curIntKey = pCur->pPage->intKey;
}
pRoot = pCur->pPage;
- assert( pRoot->pgno==pCur->pgnoRoot );
+ assert( pRoot->pgno==pCur->pgnoRoot || CORRUPT_DB );
/* If pCur->pKeyInfo is not NULL, then the caller that opened this cursor
** expected to open it on an index b-tree. Otherwise, if pKeyInfo is