1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Remove obselete and unused logic in the update code generator.

Fix the sqlite3BtreeMovetoUnpacked() routine so that it remembers the
rowid of the row that it landed on.

FossilOrigin-Name: 1a587d72f981cb7064cfd8916a52a83ad9ba6074
This commit is contained in:
drh
2016-11-11 18:19:05 +00:00
parent 79297d1d59
commit d95ef5cb5a
4 changed files with 14 additions and 17 deletions

View File

@@ -5165,16 +5165,16 @@ int sqlite3BtreeMovetoUnpacked(
if( lwr>upr ){ c = +1; break; }
}else{
assert( nCellKey==intKey );
pCur->curFlags |= BTCF_ValidNKey;
pCur->info.nKey = nCellKey;
pCur->aiIdx[pCur->iPage] = (u16)idx;
if( !pPage->leaf ){
lwr = idx;
goto moveto_next_layer;
}else{
pCur->curFlags |= BTCF_ValidNKey;
pCur->info.nKey = nCellKey;
pCur->info.nSize = 0;
*pRes = 0;
rc = SQLITE_OK;
goto moveto_finish;
return SQLITE_OK;
}
}
assert( lwr+upr>=0 );
@@ -5285,7 +5285,7 @@ moveto_next_layer:
}
moveto_finish:
pCur->info.nSize = 0;
pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
assert( (pCur->curFlags & BTCF_ValidOvfl)==0 );
return rc;
}
@@ -5483,7 +5483,7 @@ static SQLITE_NOINLINE int btreePrevious(BtCursor *pCur, int *pRes){
moveToParent(pCur);
}
assert( pCur->info.nSize==0 );
assert( (pCur->curFlags & (BTCF_ValidNKey|BTCF_ValidOvfl))==0 );
assert( (pCur->curFlags & (BTCF_ValidOvfl))==0 );
pCur->aiIdx[pCur->iPage]--;
pPage = pCur->apPage[pCur->iPage];