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

Add the BtCursor.curIntKey field and use it for a small size reduction and

performance boost.

FossilOrigin-Name: 4a17df139ac41e29c9a2e58afbd1238a5e94bd36
This commit is contained in:
drh
2015-06-27 22:49:10 +00:00
parent 15a0021b3e
commit 408efc0664
4 changed files with 17 additions and 12 deletions

View File

@@ -1955,7 +1955,7 @@ static int getAndInitPage(
/* If obtaining a child page for a cursor, we must verify that the page is
** compatible with the root page. */
if( pCur
&& ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->apPage[0]->intKey)
&& ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey)
){
rc = SQLITE_CORRUPT_BKPT;
releasePage(*ppPage);
@@ -4784,6 +4784,7 @@ static int moveToRoot(BtCursor *pCur){
return rc;
}
pCur->iPage = 0;
pCur->curIntKey = pCur->apPage[0]->intKey;
}
pRoot = pCur->apPage[0];
assert( pRoot->pgno==pCur->pgnoRoot );