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

Fix incorrect b-tree root page reports from the enhanced PRAGMA integrity_check

output introduced in version 3.42.0.

FossilOrigin-Name: 9b538f62539bcde7d7d7ad06eccdc558ecbd3f9160db35197568f4d3b4247c76
This commit is contained in:
drh
2023-05-18 23:25:48 +00:00
parent a03be7987b
commit 2c6c98dbf0
4 changed files with 12 additions and 10 deletions

View File

@@ -10688,7 +10688,7 @@ static int checkTreePage(
if( iPage==0 ) return 0;
if( checkRef(pCheck, iPage) ) return 0;
pCheck->zPfx = "Tree %u page %u: ";
pCheck->v0 = pCheck->v1 = iPage;
pCheck->v1 = iPage;
if( (rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0 ){
checkAppendMsg(pCheck,
"unable to get the page. error code=%d", rc);
@@ -11025,6 +11025,7 @@ int sqlite3BtreeIntegrityCheck(
checkPtrmap(&sCheck, aRoot[i], PTRMAP_ROOTPAGE, 0);
}
#endif
sCheck.v0 = aRoot[i];
checkTreePage(&sCheck, aRoot[i], &notUsed, LARGEST_INT64);
}
pBt->db->flags = savedDbFlags;