From: drh Date: Mon, 6 Jun 2016 01:54:20 +0000 (+0000) Subject: Small performance boost and size decrease in sqlite3BtreeMovetoUnpacked(). X-Git-Tag: version-3.14.0~108 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05a360913d38e3685a5cc994c4394fe54c131eb0;p=thirdparty%2Fsqlite.git Small performance boost and size decrease in sqlite3BtreeMovetoUnpacked(). FossilOrigin-Name: e106a77d85c20ae23ebe49a5acceeaffecb40fc2 --- diff --git a/manifest b/manifest index c43382d993..eca2ed0fc6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Small\sperformance\simprovement\sin\sthe\sLIKE\sfunction. -D 2016-06-06T01:48:14.262 +C Small\sperformance\sboost\sand\ssize\sdecrease\sin\ssqlite3BtreeMovetoUnpacked(). +D 2016-06-06T01:54:20.047 F Makefile.in 7321ef0b584224781ec7731408857fa8962c32cc F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 831503fc4e988f571590af1405645fff121b5f1e @@ -326,7 +326,7 @@ F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240 F src/backup.c 6df65fdd569c901a418887a1a76f82ec35044556 F src/bitvec.c 3ee4c8b2c94ed3a7377256e18199e6ff5cf33f63 F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73 -F src/btree.c b8875cff2d98d662a7e25d73483bccc2374d8bdb +F src/btree.c 2781fb1db1e46390a9c27a2162395f371577ac66 F src/btree.h 2107a2630e02c8cba58bb12ce14e731e734ea29c F src/btreeInt.h c18b7d2a3494695133e4e60ee36061d37f45d9a5 F src/build.c e827e57e4a29c00e8429c5fd4d9d4572cb1b32a4 @@ -1500,7 +1500,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 2d831074cf730dce47de5880d7b4570d04d15fee -R 55f60418d6dcbf8aee4f5a82499e5642 +P 5fb0c35459cf7a8662bf8cd84ac345f6fafda6cc +R 6c89b96783c3d80d21140f4fa1e28558 U drh -Z 55a25f2496cfdeb6e61ef11536fc4f7e +Z fcd58109b062d41d087b764fb431a88f diff --git a/manifest.uuid b/manifest.uuid index 8076fd6a9e..41857ac25e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5fb0c35459cf7a8662bf8cd84ac345f6fafda6cc \ No newline at end of file +e106a77d85c20ae23ebe49a5acceeaffecb40fc2 \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 5fbd6c4173..3a95edf007 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;