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

Small performance optimization and code size reduction in moveToRoot().

FossilOrigin-Name: cdcde00b2d68eeb35c472fdfd4c4508551f6722054394b43cc97eaf01ad7181d
This commit is contained in:
drh
2021-12-13 19:59:55 +00:00
parent 4f2006ddec
commit 7f8f659260
3 changed files with 8 additions and 9 deletions

View File

@@ -5274,7 +5274,7 @@ static int moveToRoot(BtCursor *pCur){
while( --pCur->iPage ){
releasePageNotNull(pCur->apPage[pCur->iPage]);
}
pCur->pPage = pCur->apPage[0];
pRoot = pCur->pPage = pCur->apPage[0];
goto skip_init;
}
}else if( pCur->pgnoRoot==0 ){
@@ -5321,7 +5321,6 @@ skip_init:
pCur->info.nSize = 0;
pCur->curFlags &= ~(BTCF_AtLast|BTCF_ValidNKey|BTCF_ValidOvfl);
pRoot = pCur->pPage;
if( pRoot->nCell>0 ){
pCur->eState = CURSOR_VALID;
}else if( !pRoot->leaf ){