aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2022-11-21 13:35:00 +0000
committerdrh <>2022-11-21 13:35:00 +0000
commitd01dee5e6aef8aebc2932f743c90f41db70e2a7c (patch)
treeb7b29f410293fec86ea8af41f63dc3516ee6f4b0 /src
parenta303392a2cadec50082344a266c16e5dabd34d37 (diff)
downloadsqlite-d01dee5e6aef8aebc2932f743c90f41db70e2a7c.tar.gz
sqlite-d01dee5e6aef8aebc2932f743c90f41db70e2a7c.zip
Small performance improvement in sqlite3BtreeTransferRow().
FossilOrigin-Name: dab959ea3edf99788bfd76352cd46a3e56876b0e7d7008c6927aa14534853c50
Diffstat (limited to 'src')
-rw-r--r--src/btree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/btree.c b/src/btree.c
index 114136bc5..83ebc3d3f 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -9314,7 +9314,6 @@ end_insert:
** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
*/
int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){
- int rc = SQLITE_OK;
BtShared *pBt = pDest->pBt;
u8 *aOut = pBt->pTmpSpace; /* Pointer to next output buffer */
const u8 *aIn; /* Pointer to next input buffer */
@@ -9337,7 +9336,9 @@ int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){
if( nIn==nRem && nIn<pDest->pPage->maxLocal ){
memcpy(aOut, aIn, nIn);
pBt->nPreformatSize = nIn + (aOut - pBt->pTmpSpace);
+ return SQLITE_OK;
}else{
+ int rc = SQLITE_OK;
Pager *pSrcPager = pSrc->pBt->pPager;
u8 *pPgnoOut = 0;
Pgno ovflIn = 0;
@@ -9405,9 +9406,8 @@ int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){
releasePage(pPageOut);
sqlite3PagerUnref(pPageIn);
+ return rc;
}
-
- return rc;
}
/*