1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Remove unreachable branches from the PRAGMA integrity_check enhancement of

[b736519d3d2e93c7].

FossilOrigin-Name: 6d02fb233fb86f9907cc374d06a7ed71a638091d6e75abc199001c42eab51e5c
This commit is contained in:
drh
2024-02-27 15:33:54 +00:00
parent 8732fce985
commit 39670a5345
5 changed files with 17 additions and 15 deletions

View File

@@ -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], &notUsed, LARGEST_INT64);
}
if( aCnt ){
sqlite3MemSetArrayInt64(aCnt, i, sCheck.nRow);
}
sqlite3MemSetArrayInt64(aCnt, i, sCheck.nRow);
}
pBt->db->flags = savedDbFlags;