mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Enhance the OP_IdxInsert opcode to optionally accept unpacked key material.
FossilOrigin-Name: 89d958abbac45f2ca5954080cd9e74ec9a07ebb2
This commit is contained in:
11
src/btree.c
11
src/btree.c
@@ -8019,7 +8019,16 @@ int sqlite3BtreeInsert(
|
||||
if( rc ) return rc;
|
||||
}
|
||||
}else if( loc==0 ){
|
||||
rc = btreeMoveto(pCur, pX->pKey, pX->nKey, appendBias, &loc);
|
||||
if( pX->nMem ){
|
||||
UnpackedRecord r;
|
||||
memset(&r, 0, sizeof(r));
|
||||
r.pKeyInfo = pCur->pKeyInfo;
|
||||
r.aMem = pX->aMem;
|
||||
r.nField = pX->nMem;
|
||||
rc = sqlite3BtreeMovetoUnpacked(pCur, &r, 0, appendBias, &loc);
|
||||
}else{
|
||||
rc = btreeMoveto(pCur, pX->pKey, pX->nKey, appendBias, &loc);
|
||||
}
|
||||
if( rc ) return rc;
|
||||
}
|
||||
assert( pCur->eState==CURSOR_VALID || (pCur->eState==CURSOR_INVALID && loc) );
|
||||
|
Reference in New Issue
Block a user