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

Arrange for sqlite3BtreeMovetoUnpacked() to always leave the cursor cell

parse cache invalidated.  This fixes issues with previous check-ins on this
branch and also runs faster.

FossilOrigin-Name: a74675607fe041e37a58a3ec287131de0e5090c3
This commit is contained in:
drh
2013-11-25 16:23:52 +00:00
parent bb933ef6e7
commit d2022b0118
3 changed files with 11 additions and 11 deletions

View File

@@ -4219,7 +4219,7 @@ static const unsigned char *fetchPayload(
assert( cursorHoldsMutex(pCur) );
pPage = pCur->apPage[pCur->iPage];
assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
if( NEVER(pCur->info.nSize==0) ){
if( pCur->info.nSize==0 ){
btreeParseCell(pCur->apPage[pCur->iPage], pCur->aiIdx[pCur->iPage],
&pCur->info);
}
@@ -4664,7 +4664,7 @@ int sqlite3BtreeMovetoUnpacked(
upr = pPage->nCell-1;
idx = biasRight ? upr : upr/2;
pCur->aiIdx[pCur->iPage] = (u16)idx;
pCur->info.nSize = 0;
// pCur->info.nSize = 0;
if( pPage->intKey ){
for(;;){
i64 nCellKey;
@@ -4781,12 +4781,12 @@ int sqlite3BtreeMovetoUnpacked(
chldPg = get4byte(findCell(pPage, lwr));
}
pCur->aiIdx[pCur->iPage] = (u16)lwr;
pCur->info.nSize = 0;
pCur->validNKey = 0;
rc = moveToChild(pCur, chldPg);
if( rc ) break;
}
moveto_finish:
pCur->info.nSize = 0;
pCur->validNKey = 0;
return rc;
}