aboutsummaryrefslogtreecommitdiff
path: root/src/btree.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-11-11 18:19:05 +0000
committerdrh <drh@noemail.net>2016-11-11 18:19:05 +0000
commitd95ef5cb5a6ef94211463d18e22259bcc48d7266 (patch)
tree40682b25c07ee1cc6b087cb8472260bc79554e85 /src/btree.c
parent79297d1d5979a82655590db1c53f76942ebc4b40 (diff)
downloadsqlite-d95ef5cb5a6ef94211463d18e22259bcc48d7266.tar.gz
sqlite-d95ef5cb5a6ef94211463d18e22259bcc48d7266.zip
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
Diffstat (limited to 'src/btree.c')
-rw-r--r--src/btree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/btree.c b/src/btree.c
index 78c4677d2..283f37b79 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -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];