aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-06-06 01:54:20 +0000
committerdrh <drh@noemail.net>2016-06-06 01:54:20 +0000
commit05a360913d38e3685a5cc994c4394fe54c131eb0 (patch)
tree31f13d1bd06c54503e59f548fecdff4769d40297 /src
parentc80937a5f5ec900d898603dfd2d3bc7c47af10fe (diff)
downloadsqlite-05a360913d38e3685a5cc994c4394fe54c131eb0.tar.gz
sqlite-05a360913d38e3685a5cc994c4394fe54c131eb0.zip
Small performance boost and size decrease in sqlite3BtreeMovetoUnpacked().
FossilOrigin-Name: e106a77d85c20ae23ebe49a5acceeaffecb40fc2
Diffstat (limited to 'src')
-rw-r--r--src/btree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/btree.c b/src/btree.c
index 5fbd6c417..3a95edf00 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -5070,11 +5070,12 @@ int sqlite3BtreeMovetoUnpacked(
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( pRes );
assert( (pIdxKey==0)==(pCur->pKeyInfo==0) );
+ assert( (pIdxKey==0)==(pCur->curIntKey!=0) || pCur->eState!=CURSOR_VALID );
/* If the cursor is already positioned at the point we are trying
** to move to, then just return without doing any work */
- if( pCur->eState==CURSOR_VALID && (pCur->curFlags & BTCF_ValidNKey)!=0
- && pCur->curIntKey
+ if( pIdxKey==0
+ && pCur->eState==CURSOR_VALID && (pCur->curFlags & BTCF_ValidNKey)!=0
){
if( pCur->info.nKey==intKey ){
*pRes = 0;