diff options
author | drh <> | 2024-02-27 15:33:54 +0000 |
---|---|---|
committer | drh <> | 2024-02-27 15:33:54 +0000 |
commit | 39670a5345e438104d2618480e124ce7581a2f88 (patch) | |
tree | 3cca121d1ca19c0335ac43e3781c4e0c7129aa12 /src/btree.c | |
parent | 8732fce9856632c3cce29787263f2770a1f0c6aa (diff) | |
download | sqlite-39670a5345e438104d2618480e124ce7581a2f88.tar.gz sqlite-39670a5345e438104d2618480e124ce7581a2f88.zip |
Remove unreachable branches from the PRAGMA integrity_check enhancement of
[b736519d3d2e93c7].
FossilOrigin-Name: 6d02fb233fb86f9907cc374d06a7ed71a638091d6e75abc199001c42eab51e5c
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/btree.c b/src/btree.c index f5bd5349c..46c077a03 100644 --- a/src/btree.c +++ b/src/btree.c @@ -11027,7 +11027,9 @@ int sqlite3BtreeIntegrityCheck( int bPartial = 0; /* True if not checking all btrees */ int bCkFreelist = 1; /* True to scan the freelist */ VVA_ONLY( int nRef ); + assert( nRoot>0 ); + assert( aCnt!=0 ); /* aRoot[0]==0 means this is a partial check */ if( aRoot[0]==0 ){ @@ -11101,7 +11103,7 @@ int sqlite3BtreeIntegrityCheck( pBt->db->flags &= ~(u64)SQLITE_CellSizeCk; for(i=0; (int)i<nRoot && sCheck.mxErr; i++){ sCheck.nRow = 0; - if( aRoot[i] && sCheck.mxErr ){ + if( aRoot[i] ){ i64 notUsed; #ifndef SQLITE_OMIT_AUTOVACUUM if( pBt->autoVacuum && aRoot[i]>1 && !bPartial ){ @@ -11111,9 +11113,7 @@ int sqlite3BtreeIntegrityCheck( sCheck.v0 = aRoot[i]; checkTreePage(&sCheck, aRoot[i], ¬Used, LARGEST_INT64); } - if( aCnt ){ - sqlite3MemSetArrayInt64(aCnt, i, sCheck.nRow); - } + sqlite3MemSetArrayInt64(aCnt, i, sCheck.nRow); } pBt->db->flags = savedDbFlags; |