1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Avoid an unnecessary memset() in the sqlite3BtreeInsert() routine.

FossilOrigin-Name: 35ecd4ebc55579175f7c934e4eb1edb969008428
This commit is contained in:
drh
2016-12-10 13:12:55 +00:00
parent fbd8cbdcf5
commit 8c730bc5c5
3 changed files with 12 additions and 8 deletions

View File

@@ -8022,10 +8022,14 @@ int sqlite3BtreeInsert(
}else if( loc==0 ){
if( pX->nMem ){
UnpackedRecord r;
memset(&r, 0, sizeof(r));
r.pKeyInfo = pCur->pKeyInfo;
r.aMem = pX->aMem;
r.nField = pX->nMem;
r.default_rc = 0;
r.errCode = 0;
r.r1 = 0;
r.r2 = 0;
r.eqSeen = 0;
rc = sqlite3BtreeMovetoUnpacked(pCur, &r, 0, appendBias, &loc);
}else{
rc = btreeMoveto(pCur, pX->pKey, pX->nKey, appendBias, &loc);